home *** CD-ROM | disk | FTP | other *** search
/ Exame Informatica 139 / Exame Informatica 139.iso / Internet / NVU / chrome / cascades.jar next >
PKZip Archive  |  2005-06-17  |  231.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: PKZip Archive (archive/zip).

You can browse this item here: cascades.jar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert PKZip Archive (archive/zip) magic Supported
66% dexvert JAR Archive (archive/jar) ext Supported
100% file Zip archive data, made by v2.3 UNIX, extract using at least v1.0, last modified, last modified Sun, Feb 04 2004 11:05:06, uncompressed size 2629, method=store default
99% file Zip archive, with extra data prepended default
98% file data default
63% TrID Mozilla Archive Format (gen) default (weak)
36% TrID ZIP compressed archive default
100% dexmagic PrintFox/Pagefox WEAK default
100% lsar Zip default
100% gt2 ZIP Archiv gefunden (Auflistung ist deaktiviert) default
100% detectItEasy Archive: Zip(1.0)[100.0%,16 files] default
100% binwalkID Zip archive data, at least v1.0 to extract, compressed size: 2629, uncompressed size: 2629, name: content/cascades/EdCssProps.css default
100% xdgMime application/zip default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 4b 03 04 0a 00 00 00 | 00 00 a3 58 44 30 b0 cb |PK......|...XD0..|
|00000010| 80 17 45 0a 00 00 45 0a | 00 00 1f 00 15 00 63 6f |..E...E.|......co|
|00000020| 6e 74 65 6e 74 2f 63 61 | 73 63 61 64 65 73 2f 45 |ntent/ca|scades/E|
|00000030| 64 43 73 73 50 72 6f 70 | 73 2e 63 73 73 55 54 09 |dCssProp|s.cssUT.|
|00000040| 00 03 d2 c3 20 40 95 de | b2 42 55 78 04 00 eb 03 |.... @..|.BUx....|
|00000050| 01 02 2f 2a 20 2a 2a 2a | 2a 2a 20 42 45 47 49 4e |../* ***|** BEGIN|
|00000060| 20 4c 49 43 45 4e 53 45 | 20 42 4c 4f 43 4b 20 2a | LICENSE| BLOCK *|
|00000070| 2a 2a 2a 2a 0a 20 2a 20 | 56 65 72 73 69 6f 6e 3a |****. * |Version:|
|00000080| 20 4d 50 4c 20 31 2e 31 | 2f 47 50 4c 20 32 2e 30 | MPL 1.1|/GPL 2.0|
|00000090| 2f 4c 47 50 4c 20 32 2e | 31 0a 20 2a 0a 20 2a 20 |/LGPL 2.|1. *. * |
|000000a0| 54 68 65 20 63 6f 6e 74 | 65 6e 74 73 20 6f 66 20 |The cont|ents of |
|000000b0| 74 68 69 73 20 66 69 6c | 65 20 61 72 65 20 73 75 |this fil|e are su|
|000000c0| 62 6a 65 63 74 20 74 6f | 20 74 68 65 20 4d 6f 7a |bject to| the Moz|
|000000d0| 69 6c 6c 61 20 50 75 62 | 6c 69 63 20 4c 69 63 65 |illa Pub|lic Lice|
|000000e0| 6e 73 65 20 56 65 72 73 | 69 6f 6e 0a 20 2a 20 31 |nse Vers|ion. * 1|
|000000f0| 2e 31 20 28 74 68 65 20 | 22 4c 69 63 65 6e 73 65 |.1 (the |"License|
|00000100| 22 29 3b 20 79 6f 75 20 | 6d 61 79 20 6e 6f 74 20 |"); you |may not |
|00000110| 75 73 65 20 74 68 69 73 | 20 66 69 6c 65 20 65 78 |use this| file ex|
|00000120| 63 65 70 74 20 69 6e 20 | 63 6f 6d 70 6c 69 61 6e |cept in |complian|
|00000130| 63 65 20 77 69 74 68 0a | 20 2a 20 74 68 65 20 4c |ce with.| * the L|
|00000140| 69 63 65 6e 73 65 2e 20 | 59 6f 75 20 6d 61 79 20 |icense. |You may |
|00000150| 6f 62 74 61 69 6e 20 61 | 20 63 6f 70 79 20 6f 66 |obtain a| copy of|
|00000160| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 20 61 74 0a | the Lic|ense at.|
|00000170| 20 2a 20 68 74 74 70 3a | 2f 2f 77 77 77 2e 6d 6f | * http:|//www.mo|
|00000180| 7a 69 6c 6c 61 2e 6f 72 | 67 2f 4d 50 4c 2f 0a 20 |zilla.or|g/MPL/. |
|00000190| 2a 0a 20 2a 20 53 6f 66 | 74 77 61 72 65 20 64 69 |*. * Sof|tware di|
|000001a0| 73 74 72 69 62 75 74 65 | 64 20 75 6e 64 65 72 20 |stribute|d under |
|000001b0| 74 68 65 20 4c 69 63 65 | 6e 73 65 20 69 73 20 64 |the Lice|nse is d|
|000001c0| 69 73 74 72 69 62 75 74 | 65 64 20 6f 6e 20 61 6e |istribut|ed on an|
|000001d0| 20 22 41 53 20 49 53 22 | 20 62 61 73 69 73 2c 0a | "AS IS"| basis,.|
|000001e0| 20 2a 20 57 49 54 48 4f | 55 54 20 57 41 52 52 41 | * WITHO|UT WARRA|
|000001f0| 4e 54 59 20 4f 46 20 41 | 4e 59 20 4b 49 4e 44 2c |NTY OF A|NY KIND,|
|00000200| 20 65 69 74 68 65 72 20 | 65 78 70 72 65 73 73 20 | either |express |
|00000210| 6f 72 20 69 6d 70 6c 69 | 65 64 2e 20 53 65 65 20 |or impli|ed. See |
|00000220| 74 68 65 20 4c 69 63 65 | 6e 73 65 0a 20 2a 20 66 |the Lice|nse. * f|
|00000230| 6f 72 20 74 68 65 20 73 | 70 65 63 69 66 69 63 20 |or the s|pecific |
|00000240| 6c 61 6e 67 75 61 67 65 | 20 67 6f 76 65 72 6e 69 |language| governi|
|00000250| 6e 67 20 72 69 67 68 74 | 73 20 61 6e 64 20 6c 69 |ng right|s and li|
|00000260| 6d 69 74 61 74 69 6f 6e | 73 20 75 6e 64 65 72 20 |mitation|s under |
|00000270| 74 68 65 0a 20 2a 20 4c | 69 63 65 6e 73 65 2e 0a |the. * L|icense..|
|00000280| 20 2a 0a 20 2a 20 54 68 | 65 20 4f 72 69 67 69 6e | *. * Th|e Origin|
|00000290| 61 6c 20 43 6f 64 65 20 | 69 73 20 43 61 53 63 61 |al Code |is CaSca|
|000002a0| 64 65 53 2c 20 61 20 73 | 74 79 6c 65 73 68 65 65 |deS, a s|tyleshee|
|000002b0| 74 20 65 64 69 74 6f 72 | 20 66 6f 72 20 43 6f 6d |t editor| for Com|
|000002c0| 70 6f 73 65 72 2e 0a 20 | 2a 0a 20 2a 20 54 68 65 |poser.. |*. * The|
|000002d0| 20 49 6e 69 74 69 61 6c | 20 44 65 76 65 6c 6f 70 | Initial| Develop|
|000002e0| 65 72 20 6f 66 20 74 68 | 65 20 4f 72 69 67 69 6e |er of th|e Origin|
|000002f0| 61 6c 20 43 6f 64 65 20 | 69 73 0a 20 2a 20 44 61 |al Code |is. * Da|
|00000300| 6e 69 65 6c 20 47 6c 61 | 7a 6d 61 6e 2e 0a 20 2a |niel Gla|zman.. *|
|00000310| 20 50 6f 72 74 69 6f 6e | 73 20 63 72 65 61 74 65 | Portion|s create|
|00000320| 64 20 62 79 20 74 68 65 | 20 49 6e 69 74 69 61 6c |d by the| Initial|
|00000330| 20 44 65 76 65 6c 6f 70 | 65 72 20 61 72 65 20 43 | Develop|er are C|
|00000340| 6f 70 79 72 69 67 68 74 | 20 28 43 29 20 32 30 30 |opyright| (C) 200|
|00000350| 32 0a 20 2a 20 74 68 65 | 20 49 6e 69 74 69 61 6c |2. * the| Initial|
|00000360| 20 44 65 76 65 6c 6f 70 | 65 72 2e 20 41 6c 6c 20 | Develop|er. All |
|00000370| 52 69 67 68 74 73 20 52 | 65 73 65 72 76 65 64 2e |Rights R|eserved.|
|00000380| 0a 20 2a 0a 20 2a 20 43 | 6f 6e 74 72 69 62 75 74 |. *. * C|ontribut|
|00000390| 6f 72 28 73 29 3a 0a 20 | 2a 20 20 20 4f 72 69 67 |or(s):. |* Orig|
|000003a0| 69 6e 61 6c 20 61 75 74 | 68 6f 72 3a 20 44 61 6e |inal aut|hor: Dan|
|000003b0| 69 65 6c 20 47 6c 61 7a | 6d 61 6e 20 3c 64 61 6e |iel Glaz|man <dan|
|000003c0| 69 65 6c 40 67 6c 61 7a | 6d 61 6e 2e 6f 72 67 3e |iel@glaz|man.org>|
|000003d0| 0a 20 2a 0a 20 2a 20 41 | 6c 74 65 72 6e 61 74 69 |. *. * A|lternati|
|000003e0| 76 65 6c 79 2c 20 74 68 | 65 20 63 6f 6e 74 65 6e |vely, th|e conten|
|000003f0| 74 73 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 20 |ts of th|is file |
|00000400| 6d 61 79 20 62 65 20 75 | 73 65 64 20 75 6e 64 65 |may be u|sed unde|
|00000410| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 0a 20 |r the te|rms of. |
|00000420| 2a 20 65 69 74 68 65 72 | 20 74 68 65 20 47 4e 55 |* either| the GNU|
|00000430| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|00000440| 4c 69 63 65 6e 73 65 20 | 56 65 72 73 69 6f 6e 20 |License |Version |
|00000450| 32 20 6f 72 20 6c 61 74 | 65 72 20 28 74 68 65 20 |2 or lat|er (the |
|00000460| 22 47 50 4c 22 29 2c 20 | 6f 72 0a 20 2a 20 74 68 |"GPL"), |or. * th|
|00000470| 65 20 47 4e 55 20 4c 65 | 73 73 65 72 20 47 65 6e |e GNU Le|sser Gen|
|00000480| 65 72 61 6c 20 50 75 62 | 6c 69 63 20 4c 69 63 65 |eral Pub|lic Lice|
|00000490| 6e 73 65 20 56 65 72 73 | 69 6f 6e 20 32 2e 31 20 |nse Vers|ion 2.1 |
|000004a0| 6f 72 20 6c 61 74 65 72 | 20 28 74 68 65 20 22 4c |or later| (the "L|
|000004b0| 47 50 4c 22 29 2c 0a 20 | 2a 20 69 6e 20 77 68 69 |GPL"),. |* in whi|
|000004c0| 63 68 20 63 61 73 65 20 | 74 68 65 20 70 72 6f 76 |ch case |the prov|
|000004d0| 69 73 69 6f 6e 73 20 6f | 66 20 74 68 65 20 47 50 |isions o|f the GP|
|000004e0| 4c 20 6f 72 20 74 68 65 | 20 4c 47 50 4c 20 61 72 |L or the| LGPL ar|
|000004f0| 65 20 61 70 70 6c 69 63 | 61 62 6c 65 20 69 6e 73 |e applic|able ins|
|00000500| 74 65 61 64 0a 20 2a 20 | 6f 66 20 74 68 6f 73 65 |tead. * |of those|
|00000510| 20 61 62 6f 76 65 2e 20 | 49 66 20 79 6f 75 20 77 | above. |If you w|
|00000520| 69 73 68 20 74 6f 20 61 | 6c 6c 6f 77 20 75 73 65 |ish to a|llow use|
|00000530| 20 6f 66 20 79 6f 75 72 | 20 76 65 72 73 69 6f 6e | of your| version|
|00000540| 20 6f 66 20 74 68 69 73 | 20 66 69 6c 65 20 6f 6e | of this| file on|
|00000550| 6c 79 0a 20 2a 20 75 6e | 64 65 72 20 74 68 65 20 |ly. * un|der the |
|00000560| 74 65 72 6d 73 20 6f 66 | 20 65 69 74 68 65 72 20 |terms of| either |
|00000570| 74 68 65 20 47 50 4c 20 | 6f 72 20 74 68 65 20 4c |the GPL |or the L|
|00000580| 47 50 4c 2c 20 61 6e 64 | 20 6e 6f 74 20 74 6f 20 |GPL, and| not to |
|00000590| 61 6c 6c 6f 77 20 6f 74 | 68 65 72 73 20 74 6f 0a |allow ot|hers to.|
|000005a0| 20 2a 20 75 73 65 20 79 | 6f 75 72 20 76 65 72 73 | * use y|our vers|
|000005b0| 69 6f 6e 20 6f 66 20 74 | 68 69 73 20 66 69 6c 65 |ion of t|his file|
|000005c0| 20 75 6e 64 65 72 20 74 | 68 65 20 74 65 72 6d 73 | under t|he terms|
|000005d0| 20 6f 66 20 74 68 65 20 | 4d 50 4c 2c 20 69 6e 64 | of the |MPL, ind|
|000005e0| 69 63 61 74 65 20 79 6f | 75 72 0a 20 2a 20 64 65 |icate yo|ur. * de|
|000005f0| 63 69 73 69 6f 6e 20 62 | 79 20 64 65 6c 65 74 69 |cision b|y deleti|
|00000600| 6e 67 20 74 68 65 20 70 | 72 6f 76 69 73 69 6f 6e |ng the p|rovision|
|00000610| 73 20 61 62 6f 76 65 20 | 61 6e 64 20 72 65 70 6c |s above |and repl|
|00000620| 61 63 65 20 74 68 65 6d | 20 77 69 74 68 20 74 68 |ace them| with th|
|00000630| 65 20 6e 6f 74 69 63 65 | 0a 20 2a 20 61 6e 64 20 |e notice|. * and |
|00000640| 6f 74 68 65 72 20 70 72 | 6f 76 69 73 69 6f 6e 73 |other pr|ovisions|
|00000650| 20 72 65 71 75 69 72 65 | 64 20 62 79 20 74 68 65 | require|d by the|
|00000660| 20 47 50 4c 20 6f 72 20 | 74 68 65 20 4c 47 50 4c | GPL or |the LGPL|
|00000670| 2e 20 49 66 20 79 6f 75 | 20 64 6f 20 6e 6f 74 20 |. If you| do not |
|00000680| 64 65 6c 65 74 65 0a 20 | 2a 20 74 68 65 20 70 72 |delete. |* the pr|
|00000690| 6f 76 69 73 69 6f 6e 73 | 20 61 62 6f 76 65 2c 20 |ovisions| above, |
|000006a0| 61 20 72 65 63 69 70 69 | 65 6e 74 20 6d 61 79 20 |a recipi|ent may |
|000006b0| 75 73 65 20 79 6f 75 72 | 20 76 65 72 73 69 6f 6e |use your| version|
|000006c0| 20 6f 66 20 74 68 69 73 | 20 66 69 6c 65 20 75 6e | of this| file un|
|000006d0| 64 65 72 0a 20 2a 20 74 | 68 65 20 74 65 72 6d 73 |der. * t|he terms|
|000006e0| 20 6f 66 20 61 6e 79 20 | 6f 6e 65 20 6f 66 20 74 | of any |one of t|
|000006f0| 68 65 20 4d 50 4c 2c 20 | 74 68 65 20 47 50 4c 20 |he MPL, |the GPL |
|00000700| 6f 72 20 74 68 65 20 4c | 47 50 4c 2e 0a 20 2a 0a |or the L|GPL.. *.|
|00000710| 20 2a 20 2a 2a 2a 2a 2a | 20 45 4e 44 20 4c 49 43 | * *****| END LIC|
|00000720| 45 4e 53 45 20 42 4c 4f | 43 4b 20 2a 2a 2a 2a 2a |ENSE BLO|CK *****|
|00000730| 20 2a 2f 0a 0a 40 6e 61 | 6d 65 73 70 61 63 65 20 | */..@na|mespace |
|00000740| 75 72 6c 28 22 68 74 74 | 70 3a 2f 2f 77 77 77 2e |url("htt|p://www.|
|00000750| 6d 6f 7a 69 6c 6c 61 2e | 6f 72 67 2f 6b 65 79 6d |mozilla.|org/keym|
|00000760| 61 73 74 65 72 2f 67 61 | 74 65 6b 65 65 70 65 72 |aster/ga|tekeeper|
|00000770| 2f 74 68 65 72 65 2e 69 | 73 2e 6f 6e 6c 79 2e 78 |/there.i|s.only.x|
|00000780| 75 6c 22 29 3b 0a 40 6e | 61 6d 65 73 70 61 63 65 |ul");.@n|amespace|
|00000790| 20 68 74 6d 6c 20 75 72 | 6c 28 22 68 74 74 70 3a | html ur|l("http:|
|000007a0| 2f 2f 77 77 77 2e 77 33 | 2e 6f 72 67 2f 31 39 39 |//www.w3|.org/199|
|000007b0| 39 2f 78 68 74 6d 6c 22 | 29 3b 0a 0a 23 73 68 65 |9/xhtml"|);..#she|
|000007c0| 65 74 49 6e 66 6f 54 61 | 62 50 61 6e 65 6c 54 69 |etInfoTa|bPanelTi|
|000007d0| 74 6c 65 2c 20 2e 74 69 | 74 6c 65 4c 61 62 65 6c |tle, .ti|tleLabel|
|000007e0| 20 7b 0a 20 20 66 6f 6e | 74 2d 77 65 69 67 68 74 | {. fon|t-weight|
|000007f0| 3a 20 62 6f 6c 64 3b 0a | 20 20 66 6f 6e 74 2d 73 |: bold;.| font-s|
|00000800| 69 7a 65 3a 20 6c 61 72 | 67 65 72 3b 0a 7d 0a 0a |ize: lar|ger;.}..|
|00000810| 2e 62 61 6e 67 49 6d 70 | 6f 72 74 61 6e 74 20 7b |.bangImp|ortant {|
|00000820| 0a 20 20 63 6f 6c 6f 72 | 3a 20 72 65 64 3b 0a 7d |. color|: red;.}|
|00000830| 0a 0a 68 74 6d 6c 7c 70 | 23 62 72 6f 77 6e 46 6f |..html|p|#brownFo|
|00000840| 78 4c 61 62 65 6c 20 7b | 0a 20 20 62 6f 72 64 65 |xLabel {|. borde|
|00000850| 72 3a 20 31 70 78 20 73 | 6f 6c 69 64 20 62 6c 61 |r: 1px s|olid bla|
|00000860| 63 6b 3b 0a 20 20 6d 61 | 72 67 69 6e 3a 20 30 70 |ck;. ma|rgin: 0p|
|00000870| 78 3b 0a 20 20 70 61 64 | 64 69 6e 67 3a 20 32 70 |x;. pad|ding: 2p|
|00000880| 78 3b 0a 20 20 6f 76 65 | 72 66 6c 6f 77 3a 20 2d |x;. ove|rflow: -|
|00000890| 6d 6f 7a 2d 68 69 64 64 | 65 6e 2d 75 6e 73 63 72 |moz-hidd|en-unscr|
|000008a0| 6f 6c 6c 61 62 6c 65 3b | 0a 20 20 68 65 69 67 68 |ollable;|. heigh|
|000008b0| 74 3a 20 37 30 70 78 3b | 0a 20 20 6d 61 78 2d 68 |t: 70px;|. max-h|
|000008c0| 65 69 67 68 74 3a 20 37 | 30 70 78 3b 0a 20 20 6c |eight: 7|0px;. l|
|000008d0| 69 6e 65 2d 68 65 69 67 | 68 74 3a 20 37 30 70 78 |ine-heig|ht: 70px|
|000008e0| 3b 0a 20 20 77 69 64 74 | 68 3a 20 31 30 30 25 3b |;. widt|h: 100%;|
|000008f0| 0a 20 20 6d 61 78 2d 77 | 69 64 74 68 3a 20 31 30 |. max-w|idth: 10|
|00000900| 30 25 3b 0a 20 20 62 61 | 63 6b 67 72 6f 75 6e 64 |0%;. ba|ckground|
|00000910| 2d 63 6f 6c 6f 72 3a 20 | 77 68 69 74 65 3b 0a 20 |-color: |white;. |
|00000920| 20 74 65 78 74 2d 61 6c | 69 67 6e 3a 20 63 65 6e | text-al|ign: cen|
|00000930| 74 65 72 3b 0a 20 20 66 | 6f 6e 74 2d 73 69 7a 65 |ter;. f|ont-size|
|00000940| 3a 20 31 32 70 74 3b 0a | 20 20 66 6f 6e 74 2d 73 |: 12pt;.| font-s|
|00000950| 74 79 6c 65 3a 20 6e 6f | 72 6d 61 6c 3b 0a 20 20 |tyle: no|rmal;. |
|00000960| 74 65 78 74 2d 74 72 61 | 6e 73 66 6f 72 6d 3a 20 |text-tra|nsform: |
|00000970| 6e 6f 6e 65 3b 0a 20 20 | 77 68 69 74 65 2d 73 70 |none;. |white-sp|
|00000980| 61 63 65 20 3a 20 6e 6f | 77 72 61 70 3b 0a 7d 0a |ace : no|wrap;.}.|
|00000990| 0a 74 72 65 65 63 68 69 | 6c 64 72 65 6e 3a 3a 2d |.treechi|ldren::-|
|000009a0| 6d 6f 7a 2d 74 72 65 65 | 2d 63 65 6c 6c 2d 74 65 |moz-tree|-cell-te|
|000009b0| 78 74 28 65 78 74 65 72 | 6e 61 6c 29 20 7b 0a 20 |xt(exter|nal) {. |
|000009c0| 20 20 20 66 6f 6e 74 2d | 73 74 79 6c 65 3a 20 69 | font-|style: i|
|000009d0| 74 61 6c 69 63 20 21 20 | 69 6d 70 6f 72 74 61 6e |talic ! |importan|
|000009e0| 74 3b 0a 7d 0a 0a 2f 2a | 0a 73 70 69 6e 62 75 74 |t;.}../*|.spinbut|
|000009f0| 74 6f 6e 73 20 69 6d 61 | 67 65 20 7b 20 62 6f 72 |tons ima|ge { bor|
|00000a00| 64 65 72 3a 20 73 6f 6c | 69 64 20 74 68 69 6e 20 |der: sol|id thin |
|00000a10| 62 6c 61 63 6b 3b 20 70 | 61 64 64 69 6e 67 3a 20 |black; p|adding: |
|00000a20| 32 70 78 3b 20 2d 6d 6f | 7a 2d 62 6f 72 64 65 72 |2px; -mo|z-border|
|00000a30| 2d 72 61 64 69 75 73 3a | 20 33 70 78 20 7d 0a 0a |-radius:| 3px }..|
|00000a40| 73 70 69 6e 62 75 74 74 | 6f 6e 73 20 69 6d 61 67 |spinbutt|ons imag|
|00000a50| 65 3a 68 6f 76 65 72 3a | 61 63 74 69 76 65 20 7b |e:hover:|active {|
|00000a60| 0a 20 20 20 62 61 63 6b | 67 72 6f 75 6e 64 2d 63 |. back|ground-c|
|00000a70| 6f 6c 6f 72 3a 20 23 39 | 30 41 31 42 33 3b 0a 20 |olor: #9|0A1B3;. |
|00000a80| 20 20 63 6f 6c 6f 72 3a | 20 23 46 46 46 46 46 46 | color:| #FFFFFF|
|00000a90| 3b 0a 20 7d 0a 2a 2f 50 | 4b 03 04 0a 00 00 00 00 |;. }.*/P|K.......|
|00000aa0| 00 1d 51 ac 32 e3 59 b5 | cd d6 03 01 00 d6 03 01 |..Q.2.Y.|........|
|00000ab0| 00 1e 00 15 00 63 6f 6e | 74 65 6e 74 2f 63 61 73 |.....con|tent/cas|
|00000ac0| 63 61 64 65 73 2f 45 64 | 43 73 73 50 72 6f 70 73 |cades/Ed|CssProps|
|00000ad0| 2e 6a 73 55 54 09 00 03 | 19 0f 83 42 95 de b2 42 |.jsUT...|...B...B|
|00000ae0| 55 78 04 00 eb 03 01 02 | 2f 2a 20 2a 2a 2a 2a 2a |Ux......|/* *****|
|00000af0| 20 42 45 47 49 4e 20 4c | 49 43 45 4e 53 45 20 42 | BEGIN L|ICENSE B|
|00000b00| 4c 4f 43 4b 20 2a 2a 2a | 2a 2a 0a 20 2a 20 56 65 |LOCK ***|**. * Ve|
|00000b10| 72 73 69 6f 6e 3a 20 4d | 50 4c 20 31 2e 31 2f 47 |rsion: M|PL 1.1/G|
|00000b20| 50 4c 20 32 2e 30 2f 4c | 47 50 4c 20 32 2e 31 0a |PL 2.0/L|GPL 2.1.|
|00000b30| 20 2a 0a 20 2a 20 54 68 | 65 20 63 6f 6e 74 65 6e | *. * Th|e conten|
|00000b40| 74 73 20 6f 66 20 74 68 | 69 73 20 66 69 6c 65 20 |ts of th|is file |
|00000b50| 61 72 65 20 73 75 62 6a | 65 63 74 20 74 6f 20 74 |are subj|ect to t|
|00000b60| 68 65 20 4d 6f 7a 69 6c | 6c 61 20 50 75 62 6c 69 |he Mozil|la Publi|
|00000b70| 63 20 4c 69 63 65 6e 73 | 65 20 56 65 72 73 69 6f |c Licens|e Versio|
|00000b80| 6e 0a 20 2a 20 31 2e 31 | 20 28 74 68 65 20 22 4c |n. * 1.1| (the "L|
|00000b90| 69 63 65 6e 73 65 22 29 | 3b 20 79 6f 75 20 6d 61 |icense")|; you ma|
|00000ba0| 79 20 6e 6f 74 20 75 73 | 65 20 74 68 69 73 20 66 |y not us|e this f|
|00000bb0| 69 6c 65 20 65 78 63 65 | 70 74 20 69 6e 20 63 6f |ile exce|pt in co|
|00000bc0| 6d 70 6c 69 61 6e 63 65 | 20 77 69 74 68 0a 20 2a |mpliance| with. *|
|00000bd0| 20 74 68 65 20 4c 69 63 | 65 6e 73 65 2e 20 59 6f | the Lic|ense. Yo|
|00000be0| 75 20 6d 61 79 20 6f 62 | 74 61 69 6e 20 61 20 63 |u may ob|tain a c|
|00000bf0| 6f 70 79 20 6f 66 20 74 | 68 65 20 4c 69 63 65 6e |opy of t|he Licen|
|00000c00| 73 65 20 61 74 0a 20 2a | 20 68 74 74 70 3a 2f 2f |se at. *| http://|
|00000c10| 77 77 77 2e 6d 6f 7a 69 | 6c 6c 61 2e 6f 72 67 2f |www.mozi|lla.org/|
|00000c20| 4d 50 4c 2f 0a 20 2a 0a | 20 2a 20 53 6f 66 74 77 |MPL/. *.| * Softw|
|00000c30| 61 72 65 20 64 69 73 74 | 72 69 62 75 74 65 64 20 |are dist|ributed |
|00000c40| 75 6e 64 65 72 20 74 68 | 65 20 4c 69 63 65 6e 73 |under th|e Licens|
|00000c50| 65 20 69 73 20 64 69 73 | 74 72 69 62 75 74 65 64 |e is dis|tributed|
|00000c60| 20 6f 6e 20 61 6e 20 22 | 41 53 20 49 53 22 20 62 | on an "|AS IS" b|
|00000c70| 61 73 69 73 2c 0a 20 2a | 20 57 49 54 48 4f 55 54 |asis,. *| WITHOUT|
|00000c80| 20 57 41 52 52 41 4e 54 | 59 20 4f 46 20 41 4e 59 | WARRANT|Y OF ANY|
|00000c90| 20 4b 49 4e 44 2c 20 65 | 69 74 68 65 72 20 65 78 | KIND, e|ither ex|
|00000ca0| 70 72 65 73 73 20 6f 72 | 20 69 6d 70 6c 69 65 64 |press or| implied|
|00000cb0| 2e 20 53 65 65 20 74 68 | 65 20 4c 69 63 65 6e 73 |. See th|e Licens|
|00000cc0| 65 0a 20 2a 20 66 6f 72 | 20 74 68 65 20 73 70 65 |e. * for| the spe|
|00000cd0| 63 69 66 69 63 20 6c 61 | 6e 67 75 61 67 65 20 67 |cific la|nguage g|
|00000ce0| 6f 76 65 72 6e 69 6e 67 | 20 72 69 67 68 74 73 20 |overning| rights |
|00000cf0| 61 6e 64 20 6c 69 6d 69 | 74 61 74 69 6f 6e 73 20 |and limi|tations |
|00000d00| 75 6e 64 65 72 20 74 68 | 65 0a 20 2a 20 4c 69 63 |under th|e. * Lic|
|00000d10| 65 6e 73 65 2e 0a 20 2a | 0a 20 2a 20 54 68 65 20 |ense.. *|. * The |
|00000d20| 4f 72 69 67 69 6e 61 6c | 20 43 6f 64 65 20 69 73 |Original| Code is|
|00000d30| 20 43 61 53 63 61 64 65 | 53 2c 20 61 20 73 74 79 | CaScade|S, a sty|
|00000d40| 6c 65 73 68 65 65 74 20 | 65 64 69 74 6f 72 20 66 |lesheet |editor f|
|00000d50| 6f 72 20 43 6f 6d 70 6f | 73 65 72 2e 0a 20 2a 0a |or Compo|ser.. *.|
|00000d60| 20 2a 20 54 68 65 20 49 | 6e 69 74 69 61 6c 20 44 | * The I|nitial D|
|00000d70| 65 76 65 6c 6f 70 65 72 | 20 6f 66 20 74 68 65 20 |eveloper| of the |
|00000d80| 4f 72 69 67 69 6e 61 6c | 20 43 6f 64 65 20 69 73 |Original| Code is|
|00000d90| 0a 20 2a 20 44 61 6e 69 | 65 6c 20 47 6c 61 7a 6d |. * Dani|el Glazm|
|00000da0| 61 6e 2e 0a 20 2a 20 50 | 6f 72 74 69 6f 6e 73 20 |an.. * P|ortions |
|00000db0| 63 72 65 61 74 65 64 20 | 62 79 20 74 68 65 20 49 |created |by the I|
|00000dc0| 6e 69 74 69 61 6c 20 44 | 65 76 65 6c 6f 70 65 72 |nitial D|eveloper|
|00000dd0| 20 61 72 65 20 43 6f 70 | 79 72 69 67 68 74 20 28 | are Cop|yright (|
|00000de0| 43 29 20 32 30 30 32 0a | 20 2a 20 74 68 65 20 49 |C) 2002.| * the I|
|00000df0| 6e 69 74 69 61 6c 20 44 | 65 76 65 6c 6f 70 65 72 |nitial D|eveloper|
|00000e00| 2e 20 41 6c 6c 20 52 69 | 67 68 74 73 20 52 65 73 |. All Ri|ghts Res|
|00000e10| 65 72 76 65 64 2e 0a 20 | 2a 0a 20 2a 20 43 6f 6e |erved.. |*. * Con|
|00000e20| 74 72 69 62 75 74 6f 72 | 28 73 29 3a 0a 20 2a 20 |tributor|(s):. * |
|00000e30| 20 20 4f 72 69 67 69 6e | 61 6c 20 61 75 74 68 6f | Origin|al autho|
|00000e40| 72 3a 20 44 61 6e 69 65 | 6c 20 47 6c 61 7a 6d 61 |r: Danie|l Glazma|
|00000e50| 6e 20 3c 64 61 6e 69 65 | 6c 40 67 6c 61 7a 6d 61 |n <danie|l@glazma|
|00000e60| 6e 2e 6f 72 67 3e 0a 20 | 2a 0a 20 2a 20 41 6c 74 |n.org>. |*. * Alt|
|00000e70| 65 72 6e 61 74 69 76 65 | 6c 79 2c 20 74 68 65 20 |ernative|ly, the |
|00000e80| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 74 68 69 73 |contents| of this|
|00000e90| 20 66 69 6c 65 20 6d 61 | 79 20 62 65 20 75 73 65 | file ma|y be use|
|00000ea0| 64 20 75 6e 64 65 72 20 | 74 68 65 20 74 65 72 6d |d under |the term|
|00000eb0| 73 20 6f 66 0a 20 2a 20 | 65 69 74 68 65 72 20 74 |s of. * |either t|
|00000ec0| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00000ed0| 75 62 6c 69 63 20 4c 69 | 63 65 6e 73 65 20 56 65 |ublic Li|cense Ve|
|00000ee0| 72 73 69 6f 6e 20 32 20 | 6f 72 20 6c 61 74 65 72 |rsion 2 |or later|
|00000ef0| 20 28 74 68 65 20 22 47 | 50 4c 22 29 2c 20 6f 72 | (the "G|PL"), or|
|00000f00| 0a 20 2a 20 74 68 65 20 | 47 4e 55 20 4c 65 73 73 |. * the |GNU Less|
|00000f10| 65 72 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |er Gener|al Publi|
|00000f20| 63 20 4c 69 63 65 6e 73 | 65 20 56 65 72 73 69 6f |c Licens|e Versio|
|00000f30| 6e 20 32 2e 31 20 6f 72 | 20 6c 61 74 65 72 20 28 |n 2.1 or| later (|
|00000f40| 74 68 65 20 22 4c 47 50 | 4c 22 29 2c 0a 20 2a 20 |the "LGP|L"),. * |
|00000f50| 69 6e 20 77 68 69 63 68 | 20 63 61 73 65 20 74 68 |in which| case th|
|00000f60| 65 20 70 72 6f 76 69 73 | 69 6f 6e 73 20 6f 66 20 |e provis|ions of |
|00000f70| 74 68 65 20 47 50 4c 20 | 6f 72 20 74 68 65 20 4c |the GPL |or the L|
|00000f80| 47 50 4c 20 61 72 65 20 | 61 70 70 6c 69 63 61 62 |GPL are |applicab|
|00000f90| 6c 65 20 69 6e 73 74 65 | 61 64 0a 20 2a 20 6f 66 |le inste|ad. * of|
|00000fa0| 20 74 68 6f 73 65 20 61 | 62 6f 76 65 2e 20 49 66 | those a|bove. If|
|00000fb0| 20 79 6f 75 20 77 69 73 | 68 20 74 6f 20 61 6c 6c | you wis|h to all|
|00000fc0| 6f 77 20 75 73 65 20 6f | 66 20 79 6f 75 72 20 76 |ow use o|f your v|
|00000fd0| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 69 73 20 66 |ersion o|f this f|
|00000fe0| 69 6c 65 20 6f 6e 6c 79 | 0a 20 2a 20 75 6e 64 65 |ile only|. * unde|
|00000ff0| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 20 65 |r the te|rms of e|
|00001000| 69 74 68 65 72 20 74 68 | 65 20 47 50 4c 20 6f 72 |ither th|e GPL or|
|00001010| 20 74 68 65 20 4c 47 50 | 4c 2c 20 61 6e 64 20 6e | the LGP|L, and n|
|00001020| 6f 74 20 74 6f 20 61 6c | 6c 6f 77 20 6f 74 68 65 |ot to al|low othe|
|00001030| 72 73 20 74 6f 0a 20 2a | 20 75 73 65 20 79 6f 75 |rs to. *| use you|
|00001040| 72 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 69 |r versio|n of thi|
|00001050| 73 20 66 69 6c 65 20 75 | 6e 64 65 72 20 74 68 65 |s file u|nder the|
|00001060| 20 74 65 72 6d 73 20 6f | 66 20 74 68 65 20 4d 50 | terms o|f the MP|
|00001070| 4c 2c 20 69 6e 64 69 63 | 61 74 65 20 79 6f 75 72 |L, indic|ate your|
|00001080| 0a 20 2a 20 64 65 63 69 | 73 69 6f 6e 20 62 79 20 |. * deci|sion by |
|00001090| 64 65 6c 65 74 69 6e 67 | 20 74 68 65 20 70 72 6f |deleting| the pro|
|000010a0| 76 69 73 69 6f 6e 73 20 | 61 62 6f 76 65 20 61 6e |visions |above an|
|000010b0| 64 20 72 65 70 6c 61 63 | 65 20 74 68 65 6d 20 77 |d replac|e them w|
|000010c0| 69 74 68 20 74 68 65 20 | 6e 6f 74 69 63 65 0a 20 |ith the |notice. |
|000010d0| 2a 20 61 6e 64 20 6f 74 | 68 65 72 20 70 72 6f 76 |* and ot|her prov|
|000010e0| 69 73 69 6f 6e 73 20 72 | 65 71 75 69 72 65 64 20 |isions r|equired |
|000010f0| 62 79 20 74 68 65 20 47 | 50 4c 20 6f 72 20 74 68 |by the G|PL or th|
|00001100| 65 20 4c 47 50 4c 2e 20 | 49 66 20 79 6f 75 20 64 |e LGPL. |If you d|
|00001110| 6f 20 6e 6f 74 20 64 65 | 6c 65 74 65 0a 20 2a 20 |o not de|lete. * |
|00001120| 74 68 65 20 70 72 6f 76 | 69 73 69 6f 6e 73 20 61 |the prov|isions a|
|00001130| 62 6f 76 65 2c 20 61 20 | 72 65 63 69 70 69 65 6e |bove, a |recipien|
|00001140| 74 20 6d 61 79 20 75 73 | 65 20 79 6f 75 72 20 76 |t may us|e your v|
|00001150| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 69 73 20 66 |ersion o|f this f|
|00001160| 69 6c 65 20 75 6e 64 65 | 72 0a 20 2a 20 74 68 65 |ile unde|r. * the|
|00001170| 20 74 65 72 6d 73 20 6f | 66 20 61 6e 79 20 6f 6e | terms o|f any on|
|00001180| 65 20 6f 66 20 74 68 65 | 20 4d 50 4c 2c 20 74 68 |e of the| MPL, th|
|00001190| 65 20 47 50 4c 20 6f 72 | 20 74 68 65 20 4c 47 50 |e GPL or| the LGP|
|000011a0| 4c 2e 0a 20 2a 0a 20 2a | 20 2a 2a 2a 2a 2a 20 45 |L.. *. *| ***** E|
|000011b0| 4e 44 20 4c 49 43 45 4e | 53 45 20 42 4c 4f 43 4b |ND LICEN|SE BLOCK|
|000011c0| 20 2a 2a 2a 2a 2a 20 2a | 2f 0a 0a 63 6f 6e 73 74 | ***** *|/..const|
|000011d0| 20 53 48 45 45 54 20 20 | 20 20 20 20 20 20 3d 20 | SHEET | = |
|000011e0| 31 3b 0a 63 6f 6e 73 74 | 20 53 54 59 4c 45 5f 52 |1;.const| STYLE_R|
|000011f0| 55 4c 45 20 20 20 3d 20 | 32 3b 0a 63 6f 6e 73 74 |ULE = |2;.const|
|00001200| 20 49 4d 50 4f 52 54 5f | 52 55 4c 45 20 20 3d 20 | IMPORT_|RULE = |
|00001210| 33 3b 0a 63 6f 6e 73 74 | 20 4d 45 44 49 41 5f 52 |3;.const| MEDIA_R|
|00001220| 55 4c 45 20 20 20 3d 20 | 34 3b 0a 63 6f 6e 73 74 |ULE = |4;.const|
|00001230| 20 43 48 41 52 53 45 54 | 5f 52 55 4c 45 20 3d 20 | CHARSET|_RULE = |
|00001240| 35 3b 0a 63 6f 6e 73 74 | 20 50 41 47 45 5f 52 55 |5;.const| PAGE_RU|
|00001250| 4c 45 20 20 20 20 3d 20 | 36 3b 0a 63 6f 6e 73 74 |LE = |6;.const|
|00001260| 20 4f 57 4e 45 52 5f 4e | 4f 44 45 20 20 20 3d 20 | OWNER_N|ODE = |
|00001270| 37 3b 0a 0a 2f 2f 20 63 | 6f 6e 73 74 20 43 4f 4d |7;..// c|onst COM|
|00001280| 50 41 54 49 42 49 4c 49 | 54 59 5f 54 41 42 20 3d |PATIBILI|TY_TAB =|
|00001290| 20 31 3b 0a 63 6f 6e 73 | 74 20 47 45 4e 45 52 41 | 1;.cons|t GENERA|
|000012a0| 4c 5f 54 41 42 20 20 20 | 20 20 20 20 3d 20 32 3b |L_TAB | = 2;|
|000012b0| 0a 63 6f 6e 73 74 20 54 | 45 58 54 5f 54 41 42 20 |.const T|EXT_TAB |
|000012c0| 20 20 20 20 20 20 20 20 | 20 3d 20 33 3b 0a 63 6f | | = 3;.co|
|000012d0| 6e 73 74 20 42 41 43 4b | 47 52 4f 55 4e 44 5f 54 |nst BACK|GROUND_T|
|000012e0| 41 42 20 20 20 20 3d 20 | 34 3b 0a 63 6f 6e 73 74 |AB = |4;.const|
|000012f0| 20 42 4f 52 44 45 52 5f | 54 41 42 20 20 20 20 20 | BORDER_|TAB |
|00001300| 20 20 20 3d 20 35 3b 0a | 63 6f 6e 73 74 20 42 4f | = 5;.|const BO|
|00001310| 58 5f 54 41 42 20 20 20 | 20 20 20 20 20 20 20 20 |X_TAB | |
|00001320| 3d 20 36 3b 0a 63 6f 6e | 73 74 20 41 55 52 41 4c |= 6;.con|st AURAL|
|00001330| 5f 54 41 42 20 20 20 20 | 20 20 20 20 20 3d 20 37 |_TAB | = 7|
|00001340| 3b 0a 63 6f 6e 73 74 20 | 4c 49 53 54 5f 54 41 42 |;.const |LIST_TAB|
|00001350| 20 20 20 20 20 20 20 20 | 20 20 3d 20 38 3b 0a 0a | | = 8;..|
|00001360| 63 6f 6e 73 74 20 47 45 | 4e 45 52 49 43 5f 53 45 |const GE|NERIC_SE|
|00001370| 4c 45 43 54 4f 52 20 20 | 20 20 20 20 3d 20 30 3b |LECTOR | = 0;|
|00001380| 0a 63 6f 6e 73 74 20 54 | 59 50 45 5f 45 4c 45 4d |.const T|YPE_ELEM|
|00001390| 45 4e 54 5f 53 45 4c 45 | 43 54 4f 52 20 3d 20 31 |ENT_SELE|CTOR = 1|
|000013a0| 3b 0a 63 6f 6e 73 74 20 | 43 4c 41 53 53 5f 53 45 |;.const |CLASS_SE|
|000013b0| 4c 45 43 54 4f 52 20 20 | 20 20 20 20 20 20 3d 20 |LECTOR | = |
|000013c0| 32 3b 0a 0a 63 6f 6e 73 | 74 20 6b 41 73 79 6e 63 |2;..cons|t kAsync|
|000013d0| 54 69 6d 65 6f 75 74 20 | 3d 20 31 35 30 30 3b 20 |Timeout |= 1500; |
|000013e0| 2f 2f 20 31 2e 35 20 73 | 65 63 6f 6e 64 0a 0a 76 |// 1.5 s|econd..v|
|000013f0| 61 72 20 6f 62 6a 65 63 | 74 73 41 72 72 61 79 20 |ar objec|tsArray |
|00001400| 3d 20 6e 75 6c 6c 3b 0a | 76 61 72 20 67 54 69 6d |= null;.|var gTim|
|00001410| 65 72 49 44 3b 0a 76 61 | 72 20 67 41 73 79 6e 63 |erID;.va|r gAsync|
|00001420| 4c 6f 61 64 69 6e 67 54 | 69 6d 65 72 49 44 3b 0a |LoadingT|imerID;.|
|00001430| 0a 2f 2f 20 6e 65 65 64 | 65 64 20 66 6f 72 20 63 |.// need|ed for c|
|00001440| 6f 6d 6d 6f 6e 43 73 73 | 50 72 6f 70 73 2e 6a 73 |ommonCss|Props.js|
|00001450| 0a 76 61 72 20 67 48 61 | 76 65 44 6f 63 75 6d 65 |.var gHa|veDocume|
|00001460| 6e 74 55 72 6c 20 3d 20 | 66 61 6c 73 65 3b 0a 0a |ntUrl = |false;..|
|00001470| 76 61 72 20 67 49 6e 73 | 65 72 74 49 6e 64 65 78 |var gIns|ertIndex|
|00001480| 20 3d 20 2d 31 3b 0a 0a | 2f 2f 20 2a 20 64 69 61 | = -1;..|// * dia|
|00001490| 6c 6f 67 20 69 6e 69 74 | 69 61 6c 69 7a 61 74 69 |log init|ializati|
|000014a0| 6f 6e 20 63 6f 64 65 0a | 66 75 6e 63 74 69 6f 6e |on code.|function|
|000014b0| 20 53 74 61 72 74 75 70 | 28 29 0a 7b 0a 20 20 2f | Startup|().{. /|
|000014c0| 2f 20 61 72 65 20 77 65 | 20 69 6e 20 61 20 70 72 |/ are we| in a pr|
|000014d0| 65 2d 31 2e 33 20 4d 6f | 7a 69 6c 6c 61 20 3f 0a |e-1.3 Mo|zilla ?.|
|000014e0| 20 20 69 66 20 28 74 79 | 70 65 6f 66 20 77 69 6e | if (ty|peof win|
|000014f0| 64 6f 77 2e 49 6e 69 74 | 45 64 69 74 6f 72 53 68 |dow.Init|EditorSh|
|00001500| 65 6c 6c 20 3d 3d 20 22 | 66 75 6e 63 74 69 6f 6e |ell == "|function|
|00001510| 22 29 20 7b 0a 20 20 20 | 20 2f 2f 20 79 65 73 2c |") {. | // yes,|
|00001520| 20 73 6f 20 6c 65 74 27 | 73 20 67 65 74 20 61 6e | so let'|s get an|
|00001530| 20 65 64 69 74 6f 72 73 | 68 65 6c 6c 0a 20 20 20 | editors|hell. |
|00001540| 20 69 66 20 28 21 49 6e | 69 74 45 64 69 74 6f 72 | if (!In|itEditor|
|00001550| 53 68 65 6c 6c 28 29 29 | 0a 20 20 20 20 20 20 72 |Shell())|. r|
|00001560| 65 74 75 72 6e 3b 0a 20 | 20 7d 0a 20 20 65 6c 73 |eturn;. | }. els|
|00001570| 65 20 69 66 20 28 74 79 | 70 65 6f 66 20 77 69 6e |e if (ty|peof win|
|00001580| 64 6f 77 2e 47 65 74 43 | 75 72 72 65 6e 74 45 64 |dow.GetC|urrentEd|
|00001590| 69 74 6f 72 20 21 3d 20 | 22 66 75 6e 63 74 69 6f |itor != |"functio|
|000015a0| 6e 22 20 7c 7c 20 21 47 | 65 74 43 75 72 72 65 6e |n" || !G|etCurren|
|000015b0| 74 45 64 69 74 6f 72 28 | 29 29 20 7b 0a 20 20 20 |tEditor(|)) {. |
|000015c0| 20 77 69 6e 64 6f 77 2e | 63 6c 6f 73 65 28 29 3b | window.|close();|
|000015d0| 0a 20 20 20 20 72 65 74 | 75 72 6e 3b 0a 20 20 7d |. ret|urn;. }|
|000015e0| 0a 0a 20 20 2f 2f 20 67 | 44 69 61 6c 6f 67 20 69 |.. // g|Dialog i|
|000015f0| 73 20 64 65 63 6c 61 72 | 65 64 20 69 6e 20 45 64 |s declar|ed in Ed|
|00001600| 44 69 61 6c 6f 67 43 6f | 6d 6d 6f 6e 2e 6a 73 0a |DialogCo|mmon.js.|
|00001610| 0a 20 20 67 44 69 61 6c | 6f 67 2e 73 65 6c 65 63 |. gDial|og.selec|
|00001620| 74 69 6f 6e 42 61 73 65 | 64 20 3d 20 66 61 6c 73 |tionBase|d = fals|
|00001630| 65 3b 0a 0a 20 20 2f 2f | 20 53 65 74 20 63 6f 6d |e;.. //| Set com|
|00001640| 6d 6f 6e 6c 79 2d 75 73 | 65 64 20 77 69 64 67 65 |monly-us|ed widge|
|00001650| 74 73 20 6c 69 6b 65 20 | 74 68 69 73 3a 0a 20 20 |ts like |this:. |
|00001660| 67 44 69 61 6c 6f 67 2e | 73 65 6c 65 63 74 65 64 |gDialog.|selected|
|00001670| 54 61 62 20 3d 20 54 45 | 58 54 5f 54 41 42 3b 0a |Tab = TE|XT_TAB;.|
|00001680| 20 20 67 44 69 61 6c 6f | 67 2e 73 68 65 65 74 73 | gDialo|g.sheets|
|00001690| 54 72 65 65 63 68 69 6c | 64 72 65 6e 20 20 20 20 |Treechil|dren |
|000016a0| 20 20 20 20 20 20 20 20 | 3d 20 64 6f 63 75 6d 65 | |= docume|
|000016b0| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|000016c0| 64 28 22 73 74 79 6c 65 | 73 68 65 65 74 73 54 72 |d("style|sheetsTr|
|000016d0| 65 65 22 29 3b 0a 20 20 | 67 44 69 61 6c 6f 67 2e |ee");. |gDialog.|
|000016e0| 73 68 65 65 74 73 54 72 | 65 65 20 20 20 20 20 20 |sheetsTr|ee |
|000016f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3d 20 | | = |
|00001700| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00001710| 65 6e 74 42 79 49 64 28 | 22 73 68 65 65 74 73 54 |entById(|"sheetsT|
|00001720| 72 65 65 22 29 3b 0a 20 | 20 67 44 69 61 6c 6f 67 |ree");. | gDialog|
|00001730| 2e 73 68 65 65 74 49 6e | 66 6f 54 61 62 20 20 20 |.sheetIn|foTab |
|00001740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3d | | =|
|00001750| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00001760| 6d 65 6e 74 42 79 49 64 | 28 22 73 68 65 65 74 49 |mentById|("sheetI|
|00001770| 6e 66 6f 54 61 62 22 29 | 3b 0a 20 20 67 44 69 61 |nfoTab")|;. gDia|
|00001780| 6c 6f 67 2e 61 74 69 6d | 70 6f 72 74 42 75 74 74 |log.atim|portButt|
|00001790| 6f 6e 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |on | |
|000017a0| 20 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 | = docu|ment.get|
|000017b0| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 61 74 69 |ElementB|yId("ati|
|000017c0| 6d 70 6f 72 74 42 75 74 | 74 6f 6e 22 29 3b 0a 20 |mportBut|ton");. |
|000017d0| 20 67 44 69 61 6c 6f 67 | 2e 61 74 6d 65 64 69 61 | gDialog|.atmedia|
|000017e0| 42 75 74 74 6f 6e 20 20 | 20 20 20 20 20 20 20 20 |Button | |
|000017f0| 20 20 20 20 20 20 20 3d | 20 64 6f 63 75 6d 65 6e | =| documen|
|00001800| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|00001810| 28 22 61 74 6d 65 64 69 | 61 42 75 74 74 6f 6e 22 |("atmedi|aButton"|
|00001820| 29 3b 0a 20 20 67 44 69 | 61 6c 6f 67 2e 6c 69 6e |);. gDi|alog.lin|
|00001830| 6b 42 75 74 74 6f 6e 20 | 20 20 20 20 20 20 20 20 |kButton | |
|00001840| 20 20 20 20 20 20 20 20 | 20 20 20 3d 20 64 6f 63 | | = doc|
|00001850| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00001860| 42 79 49 64 28 22 6c 69 | 6e 6b 42 75 74 74 6f 6e |ById("li|nkButton|
|00001870| 22 29 3b 0a 20 20 67 44 | 69 61 6c 6f 67 2e 73 74 |");. gD|ialog.st|
|00001880| 79 6c 65 42 75 74 74 6f | 6e 20 20 20 20 20 20 20 |yleButto|n |
|00001890| 20 20 20 20 20 20 20 20 | 20 20 20 20 3d 20 64 6f | | = do|
|000018a0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|000018b0| 74 42 79 49 64 28 22 73 | 74 79 6c 65 42 75 74 74 |tById("s|tyleButt|
|000018c0| 6f 6e 22 29 3b 0a 20 20 | 67 44 69 61 6c 6f 67 2e |on");. |gDialog.|
|000018d0| 72 75 6c 65 42 75 74 74 | 6f 6e 20 20 20 20 20 20 |ruleButt|on |
|000018e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3d 20 | | = |
|000018f0| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00001900| 65 6e 74 42 79 49 64 28 | 22 72 75 6c 65 42 75 74 |entById(|"ruleBut|
|00001910| 74 6f 6e 22 29 3b 0a 20 | 20 67 44 69 61 6c 6f 67 |ton");. | gDialog|
|00001920| 2e 72 65 6d 6f 76 65 42 | 75 74 74 6f 6e 20 20 20 |.removeB|utton |
|00001930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3d | | =|
|00001940| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00001950| 6d 65 6e 74 42 79 49 64 | 28 22 72 65 6d 6f 76 65 |mentById|("remove|
|00001960| 42 75 74 74 6f 6e 22 29 | 3b 0a 20 20 67 44 69 61 |Button")|;. gDia|
|00001970| 6c 6f 67 2e 75 70 42 75 | 74 74 6f 6e 20 20 20 20 |log.upBu|tton |
|00001980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001990| 20 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 | = docu|ment.get|
|000019a0| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 75 70 42 |ElementB|yId("upB|
|000019b0| 75 74 74 6f 6e 22 29 3b | 0a 20 20 67 44 69 61 6c |utton");|. gDial|
|000019c0| 6f 67 2e 64 6f 77 6e 42 | 75 74 74 6f 6e 20 20 20 |og.downB|utton |
|000019d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000019e0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 | = docum|ent.getE|
|000019f0| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 64 6f 77 6e |lementBy|Id("down|
|00001a00| 42 75 74 74 6f 6e 22 29 | 3b 0a 0a 20 20 67 44 69 |Button")|;.. gDi|
|00001a10| 61 6c 6f 67 2e 73 65 6c | 65 63 74 65 64 54 61 62 |alog.sel|ectedTab|
|00001a20| 20 3d 20 47 45 4e 45 52 | 41 4c 5f 54 41 42 3b 0a | = GENER|AL_TAB;.|
|00001a30| 20 20 67 44 69 61 6c 6f | 67 2e 73 68 65 65 74 49 | gDialo|g.sheetI|
|00001a40| 6e 66 6f 54 61 62 50 61 | 6e 65 6c 54 69 74 6c 65 |nfoTabPa|nelTitle|
|00001a50| 20 20 20 20 20 20 20 20 | 3d 20 64 6f 63 75 6d 65 | |= docume|
|00001a60| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00001a70| 64 28 22 73 68 65 65 74 | 49 6e 66 6f 54 61 62 50 |d("sheet|InfoTabP|
|00001a80| 61 6e 65 6c 54 69 74 6c | 65 22 29 3b 0a 20 20 67 |anelTitl|e");. g|
|00001a90| 44 69 61 6c 6f 67 2e 74 | 65 78 74 54 61 62 20 20 |Dialog.t|extTab |
|00001aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ab0| 20 20 20 20 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e | = d|ocument.|
|00001ac0| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 22 |getEleme|ntById("|
|00001ad0| 74 65 78 74 54 61 62 22 | 29 3b 0a 20 20 67 44 69 |textTab"|);. gDi|
|00001ae0| 61 6c 6f 67 2e 62 72 6f | 77 6e 46 6f 78 4c 61 62 |alog.bro|wnFoxLab|
|00001af0| 65 6c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |el | |
|00001b00| 20 20 20 3d 20 64 6f 63 | 75 6d 65 6e 74 2e 67 65 | = doc|ument.ge|
|00001b10| 74 45 6c 65 6d 65 6e 74 | 42 79 49 64 28 22 62 72 |tElement|ById("br|
|00001b20| 6f 77 6e 46 6f 78 4c 61 | 62 65 6c 22 29 3b 0a 20 |ownFoxLa|bel");. |
|00001b30| 20 67 44 69 61 6c 6f 67 | 2e 62 61 63 6b 67 72 6f | gDialog|.backgro|
|00001b40| 75 6e 64 49 6d 61 67 65 | 49 6e 70 75 74 20 20 20 |undImage|Input |
|00001b50| 20 20 20 20 20 20 20 3d | 20 64 6f 63 75 6d 65 6e | =| documen|
|00001b60| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|00001b70| 28 22 62 61 63 6b 67 72 | 6f 75 6e 64 49 6d 61 67 |("backgr|oundImag|
|00001b80| 65 49 6e 70 75 74 22 29 | 3b 0a 20 20 67 44 69 61 |eInput")|;. gDia|
|00001b90| 6c 6f 67 2e 62 61 63 6b | 67 72 6f 75 6e 64 50 72 |log.back|groundPr|
|00001ba0| 65 76 69 65 77 20 20 20 | 20 20 20 20 20 20 20 20 |eview | |
|00001bb0| 20 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 | = docu|ment.get|
|00001bc0| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 62 61 63 |ElementB|yId("bac|
|00001bd0| 6b 67 72 6f 75 6e 64 50 | 72 65 76 69 65 77 22 29 |kgroundP|review")|
|00001be0| 3b 0a 20 20 67 44 69 61 | 6c 6f 67 2e 73 68 65 65 |;. gDia|log.shee|
|00001bf0| 74 54 61 62 62 6f 78 20 | 20 20 20 20 20 20 20 20 |tTabbox | |
|00001c00| 20 20 20 20 20 20 20 20 | 20 20 3d 20 64 6f 63 75 | | = docu|
|00001c10| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00001c20| 79 49 64 28 22 73 68 65 | 65 74 54 61 62 62 6f 78 |yId("she|etTabbox|
|00001c30| 22 29 3b 0a 20 20 67 44 | 69 61 6c 6f 67 2e 62 61 |");. gD|ialog.ba|
|00001c40| 63 6b 67 72 6f 75 6e 64 | 43 6f 6c 6f 72 49 6e 70 |ckground|ColorInp|
|00001c50| 75 74 20 20 20 20 20 20 | 20 20 20 20 3d 20 64 6f |ut | = do|
|00001c60| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00001c70| 74 42 79 49 64 28 22 62 | 61 63 6b 67 72 6f 75 6e |tById("b|ackgroun|
|00001c80| 64 43 6f 6c 6f 72 49 6e | 70 75 74 22 29 3b 0a 20 |dColorIn|put");. |
|00001c90| 20 67 44 69 61 6c 6f 67 | 2e 74 65 78 74 43 6f 6c | gDialog|.textCol|
|00001ca0| 6f 72 49 6e 70 75 74 20 | 20 20 20 20 20 20 20 20 |orInput | |
|00001cb0| 20 20 20 20 20 20 20 3d | 20 64 6f 63 75 6d 65 6e | =| documen|
|00001cc0| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|00001cd0| 28 22 74 65 78 74 43 6f | 6c 6f 72 49 6e 70 75 74 |("textCo|lorInput|
|00001ce0| 22 29 3b 0a 20 20 67 44 | 69 61 6c 6f 67 2e 62 61 |");. gD|ialog.ba|
|00001cf0| 63 6b 67 72 6f 75 6e 64 | 52 65 70 65 61 74 4d 65 |ckground|RepeatMe|
|00001d00| 6e 75 6c 69 73 74 20 20 | 20 20 20 20 3d 20 64 6f |nulist | = do|
|00001d10| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00001d20| 74 42 79 49 64 28 22 62 | 61 63 6b 67 72 6f 75 6e |tById("b|ackgroun|
|00001d30| 64 52 65 70 65 61 74 4d | 65 6e 75 6c 69 73 74 22 |dRepeatM|enulist"|
|00001d40| 29 3b 0a 20 20 67 44 69 | 61 6c 6f 67 2e 62 61 63 |);. gDi|alog.bac|
|00001d50| 6b 67 72 6f 75 6e 64 41 | 74 74 61 63 68 6d 65 6e |kgroundA|ttachmen|
|00001d60| 74 43 68 65 63 6b 62 6f | 78 20 20 3d 20 64 6f 63 |tCheckbo|x = doc|
|00001d70| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00001d80| 42 79 49 64 28 22 62 61 | 63 6b 67 72 6f 75 6e 64 |ById("ba|ckground|
|00001d90| 41 74 74 61 63 68 6d 65 | 6e 74 43 68 65 63 6b 62 |Attachme|ntCheckb|
|00001da0| 6f 78 22 29 3b 0a 20 20 | 67 44 69 61 6c 6f 67 2e |ox");. |gDialog.|
|00001db0| 78 42 61 63 6b 67 72 6f | 75 6e 64 50 6f 73 69 74 |xBackgro|undPosit|
|00001dc0| 69 6f 6e 52 61 64 69 6f | 67 72 6f 75 70 20 3d 20 |ionRadio|group = |
|00001dd0| 64 6f 63 75 6d 65 6e 74 | 2e 67 65 74 45 6c 65 6d |document|.getElem|
|00001de0| 65 6e 74 42 79 49 64 28 | 22 78 42 61 63 6b 67 72 |entById(|"xBackgr|
|00001df0| 6f 75 6e 64 50 6f 73 69 | 74 69 6f 6e 52 61 64 69 |oundPosi|tionRadi|
|00001e00| 6f 67 72 6f 75 70 22 29 | 3b 0a 20 20 67 44 69 61 |ogroup")|;. gDia|
|00001e10| 6c 6f 67 2e 79 42 61 63 | 6b 67 72 6f 75 6e 64 50 |log.yBac|kgroundP|
|00001e20| 6f 73 69 74 69 6f 6e 52 | 61 64 69 6f 67 72 6f 75 |ositionR|adiogrou|
|00001e30| 70 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 67 65 74 |p = docu|ment.get|
|00001e40| 45 6c 65 6d 65 6e 74 42 | 79 49 64 28 22 79 42 61 |ElementB|yId("yBa|
|00001e50| 63 6b 67 72 6f 75 6e 64 | 50 6f 73 69 74 69 6f 6e |ckground|Position|
|00001e60| 52 61 64 69 6f 67 72 6f | 75 70 22 29 3b 0a 20 20 |Radiogro|up");. |
|00001e70| 67 44 69 61 6c 6f 67 2e | 66 6f 6e 74 46 61 6d 69 |gDialog.|fontFami|
|00001e80| 6c 79 52 61 64 69 6f 67 | 72 6f 75 70 20 20 20 20 |lyRadiog|roup |
|00001e90| 20 20 20 20 20 20 3d 20 | 64 6f 63 75 6d 65 6e 74 | = |document|
|00001ea0| 2e 67 65 74 45 6c 65 6d | 65 6e 74 42 79 49 64 28 |.getElem|entById(|
|00001eb0| 22 66 6f 6e 74 46 61 6d | 69 6c 79 52 61 64 69 6f |"fontFam|ilyRadio|
|00001ec0| 67 72 6f 75 70 22 29 3b | 0a 20 20 67 44 69 61 6c |group");|. gDial|
|00001ed0| 6f 67 2e 63 75 73 74 6f | 6d 46 6f 6e 74 46 61 6d |og.custo|mFontFam|
|00001ee0| 69 6c 79 49 6e 70 75 74 | 20 20 20 20 20 20 20 20 |ilyInput| |
|00001ef0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 | = docum|ent.getE|
|00001f00| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 63 75 73 74 |lementBy|Id("cust|
|00001f10| 6f 6d 46 6f 6e 74 46 61 | 6d 69 6c 79 49 6e 70 75 |omFontFa|milyInpu|
|00001f20| 74 22 29 3b 0a 20 20 67 | 44 69 61 6c 6f 67 2e 70 |t");. g|Dialog.p|
|00001f30| 72 65 64 65 66 46 6f 6e | 74 46 61 6d 69 6c 79 4d |redefFon|tFamilyM|
|00001f40| 65 6e 75 6c 69 73 74 20 | 20 20 20 20 20 3d 20 64 |enulist | = d|
|00001f50| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|00001f60| 6e 74 42 79 49 64 28 22 | 70 72 65 64 65 66 46 6f |ntById("|predefFo|
|00001f70| 6e 74 46 61 6d 69 6c 79 | 4d 65 6e 75 6c 69 73 74 |ntFamily|Menulist|
|00001f80| 22 29 3b 0a 20 20 67 44 | 69 61 6c 6f 67 2e 66 6f |");. gD|ialog.fo|
|00001f90| 6e 74 53 69 7a 65 49 6e | 70 75 74 20 20 20 20 20 |ntSizeIn|put |
|00001fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3d 20 64 6f | | = do|
|00001fb0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00001fc0| 74 42 79 49 64 28 22 66 | 6f 6e 74 53 69 7a 65 49 |tById("f|ontSizeI|
|00001fd0| 6e 70 75 74 22 29 3b 0a | 20 20 67 44 69 61 6c 6f |nput");.| gDialo|
|00001fe0| 67 2e 6c 69 6e 65 48 65 | 69 67 68 74 49 6e 70 75 |g.lineHe|ightInpu|
|00001ff0| 74 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t | |
|00002000| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00002010| 65 6d 65 6e 74 42 79 49 | 64 28 22 6c 69 6e 65 48 |ementByI|d("lineH|
|00002020| 65 69 67 68 74 49 6e 70 | 75 74 22 29 3b 0a 20 20 |eightInp|ut");. |
|00002030| 67 44 69 61 6c 6f 67 2e | 74 65 78 74 55 6e 64 65 |gDialog.|textUnde|
|00002040| 72 6c 69 6e 65 43 68 65 | 63 6b 62 6f 78 20 20 20 |rlineChe|ckbox |
|00002050| 20 20 20 20 20 20 3d 20 | 64 6f 63 75 6d 65 6e 74 | = |document|
|00002060| 2e 67 65 74 45 6c 65 6d | 65 6e 74 42 79 49 64 28 |.getElem|entById(|
|00002070| 22 75 6e 64 65 72 6c 69 | 6e 65 54 65 78 74 44 65 |"underli|neTextDe|
|00002080| 63 6f 72 61 74 69 6f 6e | 43 68 65 63 6b 62 6f 78 |coration|Checkbox|
|00002090| 22 29 3b 0a 20 20 67 44 | 69 61 6c 6f 67 2e 74 65 |");. gD|ialog.te|
|000020a0| 78 74 4f 76 65 72 6c 69 | 6e 65 43 68 65 63 6b 62 |xtOverli|neCheckb|
|000020b0| 6f 78 20 20 20 20 20 20 | 20 20 20 20 3d 20 64 6f |ox | = do|
|000020c0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|000020d0| 74 42 79 49 64 28 22 6f | 76 65 72 6c 69 6e 65 54 |tById("o|verlineT|
|000020e0| 65 78 74 44 65 63 6f 72 | 61 74 69 6f 6e 43 68 65 |extDecor|ationChe|
|000020f0| 63 6b 62 6f 78 22 29 3b | 0a 20 20 67 44 69 61 6c |ckbox");|. gDial|
|00002100| 6f 67 2e 74 65 78 74 4c | 69 6e 65 74 68 72 6f 75 |og.textL|inethrou|
|00002110| 67 68 43 68 65 63 6b 62 | 6f 78 20 20 20 20 20 20 |ghCheckb|ox |
|00002120| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 | = docum|ent.getE|
|00002130| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 6c 69 6e 65 |lementBy|Id("line|
|00002140| 74 68 72 6f 75 67 68 54 | 65 78 74 44 65 63 6f 72 |throughT|extDecor|
|00002150| 61 74 69 6f 6e 43 68 65 | 63 6b 62 6f 78 22 29 3b |ationChe|ckbox");|
|00002160| 0a 20 20 67 44 69 61 6c | 6f 67 2e 74 65 78 74 42 |. gDial|og.textB|
|00002170| 6c 69 6e 6b 43 68 65 63 | 6b 62 6f 78 20 20 20 20 |linkChec|kbox |
|00002180| 20 20 20 20 20 20 20 20 | 20 3d 20 64 6f 63 75 6d | | = docum|
|00002190| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|000021a0| 49 64 28 22 62 6c 69 6e | 6b 54 65 78 74 44 65 63 |Id("blin|kTextDec|
|000021b0| 6f 72 61 74 69 6f 6e 43 | 68 65 63 6b 62 6f 78 22 |orationC|heckbox"|
|000021c0| 29 3b 0a 20 20 67 44 69 | 61 6c 6f 67 2e 6e 6f 44 |);. gDi|alog.noD|
|000021d0| 65 63 6f 72 61 74 69 6f | 6e 43 68 65 63 6b 62 6f |ecoratio|nCheckbo|
|000021e0| 78 20 20 20 20 20 20 20 | 20 20 20 3d 20 64 6f 63 |x | = doc|
|000021f0| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|00002200| 42 79 49 64 28 22 6e 6f | 6e 65 54 65 78 74 44 65 |ById("no|neTextDe|
|00002210| 63 6f 72 61 74 69 6f 6e | 43 68 65 63 6b 62 6f 78 |coration|Checkbox|
|00002220| 22 29 3b 0a 0a 20 20 67 | 44 69 61 6c 6f 67 2e 74 |");.. g|Dialog.t|
|00002230| 6f 70 42 6f 72 64 65 72 | 53 74 79 6c 65 4d 65 6e |opBorder|StyleMen|
|00002240| 75 6c 69 73 74 20 20 20 | 20 20 20 20 20 3d 20 64 |ulist | = d|
|00002250| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|00002260| 6e 74 42 79 49 64 28 22 | 74 6f 70 42 6f 72 64 65 |ntById("|topBorde|
|00002270| 72 53 74 79 6c 65 4d 65 | 6e 75 6c 69 73 74 22 29 |rStyleMe|nulist")|
|00002280| 3b 0a 20 20 67 44 69 61 | 6c 6f 67 2e 74 6f 70 42 |;. gDia|log.topB|
|00002290| 6f 72 64 65 72 57 69 64 | 74 68 49 6e 70 75 74 20 |orderWid|thInput |
|000022a0| 20 20 20 20 20 20 20 20 | 20 20 3d 20 64 6f 63 75 | | = docu|
|000022b0| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|000022c0| 79 49 64 28 22 74 6f 70 | 42 6f 72 64 65 72 57 69 |yId("top|BorderWi|
|000022d0| 64 74 68 49 6e 70 75 74 | 22 29 3b 0a 20 20 67 44 |dthInput|");. gD|
|000022e0| 69 61 6c 6f 67 2e 74 6f | 70 42 6f 72 64 65 72 43 |ialog.to|pBorderC|
|000022f0| 6f 6c 6f 72 49 6e 70 75 | 74 20 20 20 20 20 20 20 |olorInpu|t |
|00002300| 20 20 20 20 3d 20 64 6f | 63 75 6d 65 6e 74 2e 67 | = do|cument.g|
|00002310| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 22 74 |etElemen|tById("t|
|00002320| 6f 70 42 6f 72 64 65 72 | 43 6f 6c 6f 72 49 6e 70 |opBorder|ColorInp|
|00002330| 75 74 22 29 3b 0a 0a 20 | 20 67 44 69 61 6c 6f 67 |ut");.. | gDialog|
|00002340| 2e 6c 65 66 74 42 6f 72 | 64 65 72 53 74 79 6c 65 |.leftBor|derStyle|
|00002350| 4d 65 6e 75 6c 69 73 74 | 20 20 20 20 20 20 20 3d |Menulist| =|
|00002360| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00002370| 6d 65 6e 74 42 79 49 64 | 28 22 6c 65 66 74 42 6f |mentById|("leftBo|
|00002380| 72 64 65 72 53 74 79 6c | 65 4d 65 6e 75 6c 69 73 |rderStyl|eMenulis|
|00002390| 74 22 29 3b 0a 20 20 67 | 44 69 61 6c 6f 67 2e 6c |t");. g|Dialog.l|
|000023a0| 65 66 74 42 6f 72 64 65 | 72 57 69 64 74 68 49 6e |eftBorde|rWidthIn|
|000023b0| 70 75 74 20 20 20 20 20 | 20 20 20 20 20 3d 20 64 |put | = d|
|000023c0| 6f 63 75 6d 65 6e 74 2e | 67 65 74 45 6c 65 6d 65 |ocument.|getEleme|
|000023d0| 6e 74 42 79 49 64 28 22 | 6c 65 66 74 42 6f 72 64 |ntById("|leftBord|
|000023e0| 65 72 57 69 64 74 68 49 | 6e 70 75 74 22 29 3b 0a |erWidthI|nput");.|
|000023f0| 20 20 67 44 69 61 6c 6f | 67 2e 6c 65 66 74 42 6f | gDialo|g.leftBo|
|00002400| 72 64 65 72 43 6f 6c 6f | 72 49 6e 70 75 74 20 20 |rderColo|rInput |
|00002410| 20 20 20 20 20 20 20 20 | 3d 20 64 6f 63 75 6d 65 | |= docume|
|00002420| 6e 74 2e 67 65 74 45 6c | 65 6d 65 6e 74 42 79 49 |nt.getEl|ementByI|
|00002430| 64 28 22 6c 65 66 74 42 | 6f 72 64 65 72 43 6f 6c |d("leftB|orderCol|
|00002440| 6f 72 49 6e 70 75 74 22 | 29 3b 0a 0a 20 20 67 44 |orInput"|);.. gD|
|00002450| 69 61 6c 6f 67 2e 72 69 | 67 68 74 42 6f 72 64 65 |ialog.ri|ghtBorde|
|00002460| 72 53 74 79 6c 65 4d 65 | 6e 75 6c 69 73 74 20 20 |rStyleMe|nulist |
|00002470| 20 20 20 20 3d 20 64 6f | 63 75 6d 65 6e 74 2e 67 | = do|cument.g|
|00002480| 65 74 45 6c 65 6d 65 6e | 74 42 79 49 64 28 22 72 |etElemen|tById("r|
|00002490| 69 67 68 74 42 6f 72 64 | 65 72 53 74 79 6c 65 4d |ightBord|erStyleM|
|000024a0| 65 6e 75 6c 69 73 74 22 | 29 3b 0a 20 20 67 44 69 |enulist"|);. gDi|
|000024b0| 61 6c 6f 67 2e 72 69 67 | 68 74 42 6f 72 64 65 72 |alog.rig|htBorder|
|000024c0| 57 69 64 74 68 49 6e 70 | 75 74 20 20 20 20 20 20 |WidthInp|ut |
|000024d0| 20 20 20 3d 20 64 6f 63 | 75 6d 65 6e 74 2e 67 65 | = doc|ument.ge|
|000024e0| 74 45 6c 65 6d 65 6e 74 | 42 79 49 64 28 22 72 69 |tElement|ById("ri|
|000024f0| 67 68 74 42 6f 72 64 65 | 72 57 69 64 74 68 49 6e |ghtBorde|rWidthIn|
|00002500| 70 75 74 22 29 3b 0a 20 | 20 67 44 69 61 6c 6f 67 |put");. | gDialog|
|00002510| 2e 72 69 67 68 74 42 6f | 72 64 65 72 43 6f 6c 6f |.rightBo|rderColo|
|00002520| 72 49 6e 70 75 74 20 20 | 20 20 20 20 20 20 20 3d |rInput | =|
|00002530| 20 64 6f 63 75 6d 65 6e | 74 2e 67 65 74 45 6c 65 | documen|t.getEle|
|00002540| 6d 65 6e 74 42 79 49 64 | 28 22 72 69 67 68 74 42 |mentById|("rightB|
|00002550| 6f 72 64 65 72 43 6f 6c | 6f 72 49 6e 70 75 74 22 |orderCol|orInput"|
|00002560| 29 3b 0a 0a 20 20 67 44 | 69 61 6c 6f 67 2e 62 6f |);.. gD|ialog.bo|
|00002570| 74 74 6f 6d 42 6f 72 64 | 65 72 53 74 79 6c 65 4d |ttomBord|erStyleM|
|00002580| 65 6e 75 6c 69 73 74 20 | 20 20 20 20 3d 20 64 6f |enulist | = do|
|00002590| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|000025a0| 74 42 79 49 64 28 22 62 | 6f 74 74 6f 6d 42 6f 72 |tById("b|ottomBor|
|000025b0| 64 65 72 53 74 79 6c 65 | 4d 65 6e 75 6c 69 73 74 |derStyle|Menulist|
|000025c0| 22 29 3b 0a 20 20 67 44 | 69 61 6c 6f 67 2e 62 6f |");. gD|ialog.bo|
|000025d0| 74 74 6f 6d 42 6f 72 64 | 65 72 57 69 64 74 68 49 |ttomBord|erWidthI|
|000025e0| 6e 70 75 74 20 20 20 20 | 20 20 20 20 3d 20 64 6f |nput | = do|
|000025f0| 63 75 6d 65 6e 74 2e 67 | 65 74 45 6c 65 6d 65 6e |cument.g|etElemen|
|00002600| 74 42 79 49 64 28 22 62 | 6f 74 74 6f 6d 42 6f 72 |tById("b|ottomBor|
|00002610| 64 65 72 57 69 64 74 68 | 49 6e 70 75 74 22 29 3b |derWidth|Input");|
|00002620| 0a 20 20 67 44 69 61 6c | 6f 67 2e 62 6f 74 74 6f |. gDial|og.botto|
|00002630| 6d 42 6f 72 64 65 72 43 | 6f 6c 6f 72 49 6e 70 75 |mBorderC|olorInpu|
|00002640| 74 20 20 20 20 20 20 20 | 20 3d 20 64 6f 63 75 6d |t | = docum|
|00002650| 65 6e 74 2e 67 65 74 45 | 6c 65 6d 65 6e 74 42 79 |ent.getE|lementBy|
|00002660| 49 64 28 22 62 6f 74 74 | 6f 6d 42 6f 72 64 65 72 |Id("bott|omBorder|
|00002670| 43 6f 6c 6f 72 49 6e 70 | 75 74 22 29 3b 0a 0a 20 |ColorInp|ut");.. |
|00002680| 20 67 44 69 61 6c 6f 67 | 2e 61 6c 6c 46 6f 75 72 | gDialog|.allFour|
|00002690| 42 6f 72 64 65 72 73 53 | 61 6d 65 20 20 20 20 20 |BordersS|ame |
|000026a0| 20 20 20 20 20 20 20 3d | 20 64 6f 63 75 6d 65 6e | =| documen|
|000026b0| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|000026c0| 28 22 61 6c 6c 46 6f 75 | 72 42 6f 72 64 65 72 73 |("allFou|rBorders|
|000026d0| 53 61 6d 65 22 29 3b 0a | 20 20 67 44 69 61 6c 6f |Same");.| gDialo|
|000026e0| 67 2e 62 6f 72 64 65 72 | 50 72 65 76 69 65 77 20 |g.border|Preview |
|000026f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002700| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00002710| 65 6d 65 6e 74 42 79 49 | 64 28 22 62 6f 72 64 65 |ementByI|d("borde|
|00002720| 72 50 72 65 76 69 65 77 | 22 29 3b 0a 0a 20 20 67 |rPreview|");.. g|
|00002730| 44 69 61 6c 6f 67 2e 76 | 6f 6c 75 6d 65 53 63 72 |Dialog.v|olumeScr|
|00002740| 6f 6c 6c 62 61 72 20 20 | 20 20 20 20 20 20 20 20 |ollbar | |
|00002750| 20 20 20 20 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e | = d|ocument.|
|00002760| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 22 |getEleme|ntById("|
|00002770| 76 6f 6c 75 6d 65 53 63 | 72 6f 6c 6c 62 61 72 22 |volumeSc|rollbar"|
|00002780| 29 3b 0a 20 20 67 44 69 | 61 6c 6f 67 2e 76 6f 6c |);. gDi|alog.vol|
|00002790| 75 6d 65 4d 65 6e 75 6c | 69 73 74 20 20 20 20 20 |umeMenul|ist |
|000027a0| 20 20 20 20 20 20 20 20 | 20 20 20 3d 20 64 6f 63 | | = doc|
|000027b0| 75 6d 65 6e 74 2e 67 65 | 74 45 6c 65 6d 65 6e 74 |ument.ge|tElement|
|000027c0| 42 79 49 64 28 22 76 6f | 6c 75 6d 65 4d 65 6e 75 |ById("vo|lumeMenu|
|000027d0| 6c 69 73 74 22 29 3b 0a | 20 20 67 44 69 61 6c 6f |list");.| gDialo|
|000027e0| 67 2e 6d 75 74 65 56 6f | 6c 75 6d 65 43 68 65 63 |g.muteVo|lumeChec|
|000027f0| 6b 62 6f 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |kbox | |
|00002800| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00002810| 65 6d 65 6e 74 42 79 49 | 64 28 22 6d 75 74 65 56 |ementByI|d("muteV|
|00002820| 6f 6c 75 6d 65 43 68 65 | 63 6b 62 6f 78 22 29 3b |olumeChe|ckbox");|
|00002830| 0a 0a 20 20 67 44 69 61 | 6c 6f 67 2e 6f 70 61 63 |.. gDia|log.opac|
|00002840| 69 74 79 53 63 72 6f 6c | 6c 62 61 72 20 20 20 20 |ityScrol|lbar |
|00002850| 20 20 20 20 20 20 20 20 | 20 20 3d 20 64 6f 63 75 | | = docu|
|00002860| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00002870| 79 49 64 28 22 6f 70 61 | 63 69 74 79 53 63 72 6f |yId("opa|cityScro|
|00002880| 6c 6c 62 61 72 22 29 3b | 0a 20 20 67 44 69 61 6c |llbar");|. gDial|
|00002890| 6f 67 2e 6f 70 61 63 69 | 74 79 4c 61 62 65 6c 20 |og.opaci|tyLabel |
|000028a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000028b0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 67 65 74 45 | = docum|ent.getE|
|000028c0| 6c 65 6d 65 6e 74 42 79 | 49 64 28 22 6f 70 61 63 |lementBy|Id("opac|
|000028d0| 69 74 79 4c 61 62 65 6c | 22 29 3b 0a 0a 20 20 67 |ityLabel|");.. g|
|000028e0| 44 69 61 6c 6f 67 2e 73 | 68 65 65 74 49 6e 66 6f |Dialog.s|heetInfo|
|000028f0| 54 61 62 47 72 69 64 52 | 6f 77 73 20 20 20 20 20 |TabGridR|ows |
|00002900| 20 20 20 20 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e | = d|ocument.|
|00002910| 67 65 74 45 6c 65 6d 65 | 6e 74 42 79 49 64 28 22 |getEleme|ntById("|
|00002920| 73 68 65 65 74 49 6e 66 | 6f 54 61 62 47 72 69 64 |sheetInf|oTabGrid|
|00002930| 52 6f 77 73 22 29 3b 0a | 20 20 67 44 69 61 6c 6f |Rows");.| gDialo|
|00002940| 67 2e 73 68 65 65 74 49 | 6e 66 6f 54 61 62 47 72 |g.sheetI|nfoTabGr|
|00002950| 69 64 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |id | |
|00002960| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 67 65 74 45 6c |= docume|nt.getEl|
|00002970| 65 6d 65 6e 74 42 79 49 | 64 28 22 73 68 65 65 74 |ementByI|d("sheet|
|00002980| 49 6e 66 6f 54 61 62 47 | 72 69 64 22 29 3b 0a 0a |InfoTabG|rid");..|
|00002990| 20 20 67 44 69 61 6c 6f | 67 2e 6c 69 73 74 53 74 | gDialo|g.listSt|
|000029a0| 79 6c 65 49 6d 61 67 65 | 49 6e 70 75 74 20 20 20 |yleImage|Input |
|000029b0| 20 20 20 20 20 20 20 3d | 20 64 6f 63 75 6d 65 6e | =| documen|
|000029c0| 74 2e 67 65 74 45 6c 65 | 6d 65 6e 74 42 79 49 64 |t.getEle|mentById|
|000029d0| 28 22 6c 69 73 74 53 74 | 79 6c 65 49 6d 61 67 65 |("listSt|yleImage|
|000029e0| 49 6e 70 75 74 22 29 3b | 0a 0a 20 20 67 44 69 61 |Input");|.. gDia|
|000029f0| 6c 6f 67 2e 65 78 70 65 | 72 74 4d 6f 64 65 20 3d |log.expe|rtMode =|
|00002a00| 20 74 72 75 65 3b 0a 20 | 20 67 44 69 61 6c 6f 67 | true;. | gDialog|
|00002a10| 2e 6d 6f 64 69 66 69 65 | 64 20 3d 20 66 61 6c 73 |.modifie|d = fals|
|00002a20| 65 3b 0a 20 20 67 44 69 | 61 6c 6f 67 2e 73 65 6c |e;. gDi|alog.sel|
|00002a30| 65 63 74 65 64 49 6e 64 | 65 78 20 3d 20 2d 31 3b |ectedInd|ex = -1;|
|00002a40| 0a 0a 20 20 67 44 69 61 | 6c 6f 67 2e 62 75 6e 64 |.. gDia|log.bund|
|00002a50| 6c 65 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |le | |
|00002a60| 20 20 20 20 20 20 20 20 | 20 20 3d 20 64 6f 63 75 | | = docu|
|00002a70| 6d 65 6e 74 2e 67 65 74 | 45 6c 65 6d 65 6e 74 42 |ment.get|ElementB|
|00002a80| 79 49 64 28 22 63 61 73 | 63 61 64 65 73 42 75 6e |yId("cas|cadesBun|
|00002a90| 64 6c 65 22 29 3b 0a 0a | 20 20 67 48 61 76 65 44 |dle");..| gHaveD|
|00002aa0| 6f 63 75 6d 65 6e 74 55 | 72 6c 20 3d 20 47 65 74 |ocumentU|rl = Get|
|00002ab0| 44 6f 63 75 6d 65 6e 74 | 42 61 73 65 55 72 6c 28 |Document|BaseUrl(|
|00002ac0| 29 3b 0a 0a 20 20 2f 2f | 20 49 6e 69 74 69 61 6c |);.. //| Initial|
|00002ad0| 69 7a 65 20 61 6c 6c 20 | 64 69 61 6c 6f 67 20 77 |ize all |dialog w|
|00002ae0| 69 64 67 65 74 73 20 68 | 65 72 65 2c 0a 20 20 2f |idgets h|ere,. /|
|00002af0| 2f 20 65 2e 67 2e 2c 20 | 67 65 74 20 61 74 74 72 |/ e.g., |get attr|
|00002b00| 69 62 75 74 65 73 20 66 | 72 6f 6d 20 61 6e 20 65 |ibutes f|rom an e|
|00002b10| 6c 65 6d 65 6e 74 20 66 | 6f 72 20 70 72 6f 70 65 |lement f|or prope|
|00002b20| 72 74 79 20 64 69 61 6c | 6f 67 0a 20 20 49 6e 69 |rty dial|og. Ini|
|00002b30| 74 53 68 65 65 74 73 54 | 72 65 65 28 67 44 69 61 |tSheetsT|ree(gDia|
|00002b40| 6c 6f 67 2e 73 68 65 65 | 74 73 54 72 65 65 63 68 |log.shee|tsTreech|
|00002b50| 69 6c 64 72 65 6e 29 3b | 0a 20 20 0a 20 20 2f 2f |ildren);|. . //|
|00002b60| 20 53 65 74 20 77 69 6e | 64 6f 77 20 6c 6f 63 61 | Set win|dow loca|
|00002b70| 74 69 6f 6e 20 72 65 6c | 61 74 69 76 65 20 74 6f |tion rel|ative to|
|00002b80| 20 70 61 72 65 6e 74 20 | 77 69 6e 64 6f 77 20 28 | parent |window (|
|00002b90| 62 61 73 65 64 20 6f 6e | 20 70 65 72 73 69 73 74 |based on| persist|
|00002ba0| 65 64 20 61 74 74 72 69 | 62 75 74 65 73 29 0a 20 |ed attri|butes). |
|00002bb0| 20 53 65 74 57 69 6e 64 | 6f 77 4c 6f 63 61 74 69 | SetWind|owLocati|
|00002bc0| 6f 6e 28 29 3b 0a 7d 0a | 0a 2f 2f 20 2a 20 54 6f |on();.}.|.// * To|
|00002bd0| 67 67 6c 65 73 20 6f 6e | 2f 6f 66 66 20 65 78 70 |ggles on|/off exp|
|00002be0| 65 72 74 20 6d 6f 64 65 | 2e 20 49 6e 20 65 78 70 |ert mode|. In exp|
|00002bf0| 65 72 74 20 6d 6f 64 65 | 2c 20 61 6c 6c 20 62 75 |ert mode|, all bu|
|00002c00| 74 74 6f 6e 73 20 61 72 | 65 20 65 6e 61 62 6c 65 |ttons ar|e enable|
|00002c10| 64 0a 2f 2f 20 20 20 69 | 6e 63 6c 75 64 69 6e 67 |d.// i|ncluding|
|00002c20| 20 62 75 74 74 6f 6e 73 | 20 66 6f 72 20 73 74 79 | buttons| for sty|
|00002c30| 6c 65 73 68 65 65 74 20 | 63 72 65 61 74 69 6f 6e |lesheet |creation|
|00002c40| 2e 20 57 68 65 6e 20 74 | 68 65 20 6d 6f 64 65 20 |. When t|he mode |
|00002c50| 69 73 20 6f 66 66 2c 20 | 6f 6e 6c 79 0a 2f 2f 20 |is off, |only.// |
|00002c60| 20 20 74 68 65 20 22 63 | 72 65 61 74 65 20 72 75 | the "c|reate ru|
|00002c70| 6c 65 22 20 62 75 74 74 | 6f 6e 20 69 73 20 65 6e |le" butt|on is en|
|00002c80| 61 62 6c 65 64 2c 20 61 | 20 73 74 79 6c 65 73 68 |abled, a| stylesh|
|00002c90| 65 65 74 20 62 65 69 6e | 67 20 63 72 65 61 74 65 |eet bein|g create|
|00002ca0| 64 20 74 6f 20 63 6f 6e | 74 61 69 6e 0a 2f 2f 20 |d to con|tain.// |
|00002cb0| 20 20 74 68 65 20 6e 65 | 77 20 72 75 6c 65 20 69 | the ne|w rule i|
|00002cc0| 66 20 6e 65 63 65 73 73 | 61 72 79 0a 66 75 6e 63 |f necess|ary.func|
|00002cd0| 74 69 6f 6e 20 74 6f 67 | 67 6c 65 45 78 70 65 72 |tion tog|gleExper|
|00002ce0| 74 4d 6f 64 65 28 29 0a | 7b 0a 20 20 2f 2f 20 74 |tMode().|{. // t|
|00002cf0| 6f 67 67 6c 65 20 74 68 | 65 20 62 6f 6f 6c 65 61 |oggle th|e boolea|
|00002d00| 6e 0a 20 20 67 44 69 61 | 6c 6f 67 2e 65 78 70 65 |n. gDia|log.expe|
|00002d10| 72 74 4d 6f 64 65 20 3d | 20 21 67 44 69 61 6c 6f |rtMode =| !gDialo|
|00002d20| 67 2e 65 78 70 65 72 74 | 4d 6f 64 65 3b 0a 0a 20 |g.expert|Mode;.. |
|00002d30| 20 69 66 20 28 67 44 69 | 61 6c 6f 67 2e 65 78 70 | if (gDi|alog.exp|
|00002d40| 65 72 74 4d 6f 64 65 29 | 20 7b 0a 20 20 20 20 69 |ertMode)| {. i|
|00002d50| 66 20 28 67 44 69 61 6c | 6f 67 2e 73 65 6c 65 63 |f (gDial|og.selec|
|00002d60| 74 65 64 49 6e 64 65 78 | 20 3d 3d 20 2d 31 29 20 |tedIndex| == -1) |
|00002d70| 7b 0a 20 20 20 20 20 20 | 2f 2f 20 69 66 20 65 78 |{. |// if ex|
|00002d80| 70 65 72 74 20 6d 6f 64 | 65 20 69 73 20 6f 6e 20 |pert mod|e is on |
|00002d90| 62 75 74 20 6e 6f 20 73 | 65 6c 65 63 74 69 6f 6e |but no s|election|
|00002da0| 20 69 6e 20 74 68 65 20 | 74 72 65 65 2c 20 6f 6e | in the |tree, on|
|00002db0| 6c 79 0a 20 20 20 20 20 | 20 2f 2f 20 73 68 65 65 |ly. | // shee|
|00002dc0| 74 20 63 72 65 61 74 69 | 6f 6e 20 62 75 74 74 6f |t creati|on butto|
|00002dd0| 6e 73 20 61 72 65 20 65 | 6e 61 62 6c 65 64 0a 20 |ns are e|nabled. |
|00002de0| 20 20 20 20 20 55 70 64 | 61 74 65 42 75 74 74 6f | Upd|ateButto|
|00002df0| 6e 73 28 66 61 6c 73 65 | 2c 20 66 61 6c 73 65 2c |ns(false|, false,|
|00002e00| 20 74 72 75 65 2c 20 74 | 72 75 65 2c 20 66 61 6c | true, t|rue, fal|
|00002e10| 73 65 2c 20 66 61 6c 73 | 65 29 3b 0a 20 20 20 20 |se, fals|e);. |
|00002e20| 7d 0a 20 20 20 20 65 6c | 73 65 20 7b 0a 20 20 20 |}. el|se {. |
|00002e30| 20 20 20 2f 2f 20 69 66 | 20 65 78 70 65 72 74 20 | // if| expert |
|00002e40| 6d 6f 64 65 20 69 73 20 | 6f 6e 20 61 6e 64 20 77 |mode is |on and w|
|00002e50| 65 20 68 61 76 65 20 73 | 6f 6d 65 74 68 69 6e 67 |e have s|omething|
|00002e60| 20 73 65 6c 65 63 74 65 | 64 20 69 6e 20 74 68 65 | selecte|d in the|
|00002e70| 20 74 72 65 65 2c 0a 20 | 20 20 20 20 20 2f 2f 20 | tree,. | // |
|00002e80| 74 68 65 20 73 74 61 74 | 65 20 6f 66 20 74 68 65 |the stat|e of the|
|00002e90| 20 62 75 74 74 6f 6e 73 | 20 64 65 70 65 6e 64 20 | buttons| depend |
|00002ea0| 6f 6e 20 74 68 65 20 74 | 79 70 65 20 6f 66 20 74 |on the t|ype of t|
|00002eb0| 68 65 20 73 65 6c 65 63 | 74 69 6f 6e 0a 20 20 20 |he selec|tion. |
|00002ec0| 20 20 20 76 61 72 20 65 | 78 74 65 72 6e 61 6c 20 | var e|xternal |
|00002ed0| 20 3d 20 6f 62 6a 65 63 | 74 73 41 72 72 61 79 5b | = objec|tsArray[|
|00002ee0| 67 44 69 61 6c 6f 67 2e | 73 65 6c 65 63 74 65 64 |gDialog.|selected|
|00002ef0| 49 6e 64 65 78 5d 2e 65 | 78 74 65 72 6e 61 6c 3b |Index].e|xternal;|
|00002f00| 0a 20 20 20 20 20 20 76 | 61 72 20 74 79 70 65 20 |. v|ar type |
|00002f10| 20 20 20 20 20 3d 20 6f | 62 6a 65 63 74 73 41 72 | = o|bjectsAr|
|00002f20| 72 61 79 5b 67 44 69 61 | 6c 6f 67 2e 73 65 6c 65 |ray[gDia|log.sele|
|00002f30| 63 74 65 64 49 6e 64 65 | 78 5d 2e 74 79 70 65 3b |ctedInde|x].type;|
|00002f40| 0a 20 20 20 20 20 20 55 | 70 64 61 74 65 42 75 74 |. U|pdateBut|
|00002f50| 74 6f 6e 73 28 21 65 78 | 74 65 72 6e 61 6c 2c 20 |tons(!ex|ternal, |
|00002f60| 21 65 78 74 65 72 6e 61 | 6c 2c 20 74 72 75 65 2c |!externa|l, true,|
|00002f70| 20 74 72 75 65 2c 20 21 | 65 78 74 65 72 6e 61 6c | true, !|external|
|00002f80| 2c 20 28 21 65 78 74 65 | 72 6e 61 6c 20 7c 7c 20 |, (!exte|rnal || |
|00002f90| 28 74 79 70 65 20 3d 3d | 20 53 48 45 45 54 29 29 |(type ==| SHEET))|
|00002fa0| 20 29 3b 0a 20 20 20 20 | 7d 0a 20 20 7d 0a 20 20 | );. |}. }. |
|00002fb0| 65 6c 73 65 20 7b 0a 20 | 20 20 20 2f 2f 20 69 66 |else {. | // if|
|00002fc0| 20 77 65 27 72 65 20 6e | 6f 74 20 69 6e 20 65 78 | we're n|ot in ex|
|00002fd0| 70 65 72 74 20 6d 6f 64 | 65 2c 20 61 6c 6c 6f 77 |pert mod|e, allow|
|00002fe0| 20 6f 6e 6c 79 20 72 75 | 6c 65 20 63 72 65 61 74 | only ru|le creat|
|00002ff0| 69 6f 6e 20 62 75 74 74 | 6f 6e 0a 20 20 20 20 55 |ion butt|on. U|
|00003000| 70 64 61 74 65 42 75 74 | 74 6f 6e 73 28 21 67 44 |pdateBut|tons(!gD|
|00003010| 69 61 6c 6f 67 2e 61 74 | 69 6d 70 6f 72 74 42 75 |ialog.at|importBu|
|00003020| 74 74 6f 6e 2e 68 61 73 | 41 74 74 72 69 62 75 74 |tton.has|Attribut|
|00003030| 65 28 22 64 69 73 61 62 | 6c 65 64 22 29 2c 0a 20 |e("disab|led"),. |
|00003040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003050| 20 21 67 44 69 61 6c 6f | 67 2e 61 74 6d 65 64 69 | !gDialo|g.atmedi|
|00003060| 61 42 75 74 74 6f 6e 2e | 68 61 73 41 74 74 72 69 |aButton.|hasAttri|
|00003070| 62 75 74 65 28 22 64 69 | 73 61 62 6c 65 64 22 29 |bute("di|sabled")|
|00003080| 2c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|00003090| 20 20 20 20 21 67 44 69 | 61 6c 6f 67 2e 6c 69 6e | !gDi|alog.lin|
|000030a0| 6b 42 75 74 74 6f 6e 2e | 68 61 73 41 74 74 72 69 |kButton.|hasAttri|
|000030b0| 62 75 74 65 28 22 64 69 | 73 61 62 6c 65 64 22 29 |bute("di|sabled")|
|000030c0| 2c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|000030d0| 20 20 20 20 21 67 44 69 | 61 6c 6f 67 2e 73 74 79 | !gDi|alog.sty|
|000030e0| 6c 65 42 75 74 74 6f 6e | 2e 68 61 73 41 74 74 72 |leButton|.hasAttr|
|000030f0| 69 62 75 74 65 28 22 64 | 69 73 61 62 6c 65 64 22 |ibute("d|isabled"|
|00003100| 29 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |),. | |
|00003110| 20 20 20 20 20 21 67 44 | 69 61 6c 6f 67 2e 72 75 | !gD|ialog.ru|
|00003120| 6c 65 42 75 74 74 6f 6e | 2e 68 61 73 41 74 74 72 |leButton|.hasAttr|
|00003130| 69 62 75 74 65 28 22 64 | 69 73 61 62 6c 65 64 22 |ibute("d|isabled"|
|00003140| 29 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |),. | |
|00003150| 20 20 20 20 20 21 67 44 | 69 61 6c 6f 67 2e 72 65 | !gD|ialog.re|
|00003160| 6d 6f 76 65 42 75 74 74 | 6f 6e 2e 68 61 73 41 74 |moveButt|on.hasAt|
|00003170| 74 72 69 62 75 74 65 28 | 22 64 69 73 61 62 6c 65 |tribute(|"disable|
|00003180| 64 22 29 29 3b 0a 20 20 | 7d 0a 7d 0a 0a 2f 2f 20 |d"));. |}.}..// |
|00003190| 2a 20 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |* This f|unction |
|000031a0| 72 65 63 72 65 61 74 65 | 73 20 74 68 65 20 63 6f |recreate|s the co|
|000031b0| 6e 74 65 6e 74 73 20 6f | 66 20 74 68 65 20 53 54 |ntents o|f the ST|
|000031c0| 59 4c 45 20 65 6c 65 6d | 65 6e 74 73 20 61 6e 64 |YLE elem|ents and|
|000031d0| 0a 2f 2f 20 20 20 6f 66 | 20 74 68 65 20 73 74 79 |.// of| the sty|
|000031e0| 6c 65 73 68 65 65 74 73 | 20 6c 6f 63 61 6c 20 74 |lesheets| local t|
|000031f0| 6f 20 74 68 65 20 66 69 | 6c 65 73 79 73 74 65 6d |o the fi|lesystem|
|00003200| 0a 66 75 6e 63 74 69 6f | 6e 20 46 6c 75 73 68 43 |.functio|n FlushC|
|00003210| 68 61 6e 67 65 73 28 29 | 0a 7b 0a 20 20 69 66 20 |hanges()|.{. if |
|00003220| 28 67 44 69 61 6c 6f 67 | 2e 6d 6f 64 69 66 69 65 |(gDialog|.modifie|
|00003230| 64 29 20 7b 0a 20 20 20 | 20 2f 2f 20 6c 65 74 27 |d) {. | // let'|
|00003240| 73 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 65 20 |s make s|ure the |
|00003250| 65 64 69 74 6f 72 20 69 | 73 20 67 6f 69 6e 67 20 |editor i|s going |
|00003260| 74 6f 20 72 65 71 75 69 | 72 65 20 73 61 76 65 20 |to requi|re save |
|00003270| 6f 6e 20 65 78 69 74 0a | 20 20 20 20 67 65 74 43 |on exit.| getC|
|00003280| 75 72 72 65 6e 74 45 64 | 69 74 6f 72 28 29 2e 69 |urrentEd|itor().i|
|00003290| 6e 63 72 65 6d 65 6e 74 | 4d 6f 64 69 66 69 63 61 |ncrement|Modifica|
|000032a0| 74 69 6f 6e 43 6f 75 6e | 74 28 31 29 3b 0a 20 20 |tionCoun|t(1);. |
|000032b0| 7d 0a 20 20 2f 2f 20 56 | 61 6c 69 64 61 74 65 20 |}. // V|alidate |
|000032c0| 61 6c 6c 20 75 73 65 72 | 20 64 61 74 61 20 61 6e |all user| data an|
|000032d0| 64 20 73 65 74 20 61 74 | 74 72 69 62 75 74 65 73 |d set at|tributes|
|000032e0| 20 61 6e 64 20 70 6f 73 | 73 69 62 6c 79 20 69 6e | and pos|sibly in|
|000032f0| 73 65 72 74 20 6e 65 77 | 20 65 6c 65 6d 65 6e 74 |sert new| element|
|00003300| 20 68 65 72 65 0a 20 20 | 2f 2f 20 49 66 20 74 68 | here. |// If th|
|00003310| 65 72 65 27 73 20 61 6e | 20 65 72 72 6f 72 20 74 |ere's an| error t|
|00003320| 68 65 20 75 73 65 72 20 | 6d 75 73 74 20 63 6f 72 |he user |must cor|
|00003330| 72 65 63 74 2c 20 72 65 | 74 75 72 6e 20 66 61 6c |rect, re|turn fal|
|00003340| 73 65 20 74 6f 20 6b 65 | 65 70 20 64 69 61 6c 6f |se to ke|ep dialo|
|00003350| 67 20 6f 70 65 6e 2e 0a | 20 20 76 61 72 20 73 68 |g open..| var sh|
|00003360| 65 65 74 3b 0a 20 20 66 | 6f 72 20 28 76 61 72 20 |eet;. f|or (var |
|00003370| 69 20 3d 20 30 3b 20 69 | 20 3c 20 6f 62 6a 65 63 |i = 0; i| < objec|
|00003380| 74 73 41 72 72 61 79 2e | 6c 65 6e 67 74 68 3b 20 |tsArray.|length; |
|00003390| 69 2b 2b 29 20 7b 0a 20 | 20 20 20 69 66 20 28 6f |i++) {. | if (o|
|000033a0| 62 6a 65 63 74 73 41 72 | 72 61 79 5b 69 5d 2e 6d |bjectsAr|ray[i].m|
|000033b0| 6f 64 69 66 69 65 64 20 | 26 26 20 21 6f 62 6a 65 |odified |&& !obje|
|000033c0| 63 74 73 41 72 72 61 79 | 5b 69 5d 2e 65 78 74 65 |ctsArray|[i].exte|
|000033d0| 72 6e 61 6c 20 26 26 0a | 20 20 20 20 20 20 20 20 |rnal &&.| |
|000033e0| 6f 62 6a 65 63 74 73 41 | 72 72 61 79 5b 69 5d 2e |objectsA|rray[i].|
|000033f0| 74 79 70 65 20 3d 3d 20 | 53 48 45 45 54 29 20 7b |type == |SHEET) {|
|00003400| 0a 20 20 20 20 20 20 2f | 2a 20 6c 65 74 27 73 20 |. /|* let's |
|00003410| 73 65 72 69 61 6c 69 7a | 65 20 74 68 69 73 20 73 |serializ|e this s|
|00003420| 74 79 6c 65 73 68 65 65 | 74 20 21 20 2a 2f 0a 20 |tyleshee|t ! */. |
|00003430| 20 20 20 20 20 73 68 65 | 65 74 20 3d 20 6f 62 6a | she|et = obj|
|00003440| 65 63 74 73 41 72 72 61 | 79 5b 69 5d 2e 63 73 73 |ectsArra|y[i].css|
|00003450| 45 6c 74 3b 0a 20 20 20 | 20 20 20 69 66 20 28 73 |Elt;. | if (s|
|00003460| 68 65 65 74 2e 6f 77 6e | 65 72 4e 6f 64 65 2e 6e |heet.own|erNode.n|
|00003470| 6f 64 65 4e 61 6d 65 2e | 74 6f 4c 6f 77 65 72 43 |odeName.|toLowerC|
|00003480| 61 73 65 28 29 20 3d 3d | 20 22 6c 69 6e 6b 22 29 |ase() ==| "link")|
|00003490| 0a 20 20 20 20 20 20 20 | 20 53 65 72 69 61 6c 69 |. | Seriali|
|000034a0| 7a 65 45 78 74 65 72 6e | 61 6c 53 68 65 65 74 28 |zeExtern|alSheet(|
|000034b0| 73 68 65 65 74 2c 20 6e | 75 6c 6c 29 3b 0a 20 20 |sheet, n|ull);. |
|000034c0| 20 20 20 20 65 6c 73 65 | 0a 20 20 20 20 20 20 20 | else|. |
|000034d0| 20 53 65 72 69 61 6c 69 | 7a 65 45 6d 62 65 64 64 | Seriali|zeEmbedd|
|000034e0| 65 64 53 68 65 65 74 28 | 73 68 65 65 74 29 3b 0a |edSheet(|sheet);.|
|000034f0| 20 20 20 20 7d 0a 20 20 | 7d 0a 20 20 53 61 76 65 | }. |}. Save|
|00003500| 57 69 6e 64 6f 77 4c 6f | 63 61 74 69 6f 6e 28 29 |WindowLo|cation()|
|00003510| 3b 0a 20 20 72 65 74 75 | 72 6e 20 74 72 75 65 3b |;. retu|rn true;|
|00003520| 20 2f 2f 20 64 6f 20 63 | 6c 6f 73 65 20 74 68 65 | // do c|lose the|
|00003530| 20 77 69 6e 64 6f 77 0a | 7d 0a 0a 2f 2f 20 2a 20 | window.|}..// * |
|00003540| 72 65 6d 6f 76 65 73 20 | 61 6c 6c 20 74 68 65 20 |removes |all the |
|00003550| 63 6f 6e 74 65 6e 74 20 | 69 6e 20 61 20 74 72 65 |content |in a tre|
|00003560| 65 0a 2f 2f 20 20 20 70 | 61 72 61 6d 20 58 55 4c |e.// p|aram XUL|
|00003570| 45 6c 65 6d 65 6e 74 20 | 73 68 65 65 74 73 54 72 |Element |sheetsTr|
|00003580| 65 65 0a 66 75 6e 63 74 | 69 6f 6e 20 43 6c 65 61 |ee.funct|ion Clea|
|00003590| 6e 53 68 65 65 74 73 54 | 72 65 65 28 73 68 65 65 |nSheetsT|ree(shee|
|000035a0| 74 73 54 72 65 65 43 68 | 69 6c 64 72 65 6e 29 0a |tsTreeCh|ildren).|
|000035b0| 7b 0a 20 20 2f 2f 20 77 | 65 20 6e 65 65 64 20 74 |{. // w|e need t|
|000035c0| 6f 20 63 6c 65 61 72 20 | 74 68 65 20 73 65 6c 65 |o clear |the sele|
|000035d0| 63 74 69 6f 6e 20 69 6e | 20 74 68 65 20 74 72 65 |ction in| the tre|
|000035e0| 65 20 6f 74 68 65 72 77 | 69 73 65 20 74 68 65 20 |e otherw|ise the |
|000035f0| 6f 6e 73 65 6c 65 63 74 | 0a 20 20 2f 2f 20 61 63 |onselect|. // ac|
|00003600| 74 69 6f 6e 20 6f 6e 20 | 74 68 65 20 74 72 65 65 |tion on |the tree|
|00003610| 20 77 69 6c 6c 20 62 65 | 20 66 69 72 65 64 20 77 | will be| fired w|
|00003620| 68 65 6e 20 77 65 20 72 | 65 6d 6f 76 65 64 20 74 |hen we r|emoved t|
|00003630| 68 65 20 73 65 6c 65 63 | 74 65 64 20 65 6e 74 72 |he selec|ted entr|
|00003640| 79 0a 20 20 43 6c 65 61 | 72 54 72 65 65 53 65 6c |y. Clea|rTreeSel|
|00003650| 65 63 74 69 6f 6e 28 67 | 44 69 61 6c 6f 67 2e 73 |ection(g|Dialog.s|
|00003660| 68 65 65 74 73 54 72 65 | 65 29 3b 0a 0a 20 20 76 |heetsTre|e);.. v|
|00003670| 61 72 20 65 6c 74 20 3d | 20 73 68 65 65 74 73 54 |ar elt =| sheetsT|
|00003680| 72 65 65 43 68 69 6c 64 | 72 65 6e 2e 66 69 72 73 |reeChild|ren.firs|
|00003690| 74 43 68 69 6c 64 3b 0a | 20 20 77 68 69 6c 65 20 |tChild;.| while |
|000036a0| 28 65 6c 74 29 20 7b 0a | 20 20 20 20 76 61 72 20 |(elt) {.| var |
|000036b0| 74 6d 70 20 3d 20 65 6c | 74 2e 6e 65 78 74 53 69 |tmp = el|t.nextSi|
|000036c0| 62 6c 69 6e 67 3b 0a 20 | 20 20 20 73 68 65 65 74 |bling;. | sheet|
|000036d0| 73 54 72 65 65 43 68 69 | 6c 64 72 65 6e 2e 72 65 |sTreeChi|ldren.re|
|000036e0| 6d 6f 76 65 43 68 69 6c | 64 28 65 6c 74 29 3b 0a |moveChil|d(elt);.|
|000036f0| 20 20 20 20 65 6c 74 20 | 3d 20 74 6d 70 3b 0a 20 | elt |= tmp;. |
|00003700| 20 7d 0a 7d 0a 0a 66 75 | 6e 63 74 69 6f 6e 20 41 | }.}..fu|nction A|
|00003710| 64 64 53 68 65 65 74 45 | 6e 74 72 79 54 6f 54 72 |ddSheetE|ntryToTr|
|00003720| 65 65 28 73 68 65 65 74 | 73 54 72 65 65 2c 20 6f |ee(sheet|sTree, o|
|00003730| 77 6e 65 72 4e 6f 64 65 | 29 0a 7b 0a 20 20 69 66 |wnerNode|).{. if|
|00003740| 20 28 6f 77 6e 65 72 4e | 6f 64 65 2e 6e 6f 64 65 | (ownerN|ode.node|
|00003750| 54 79 70 65 20 3d 3d 20 | 4e 6f 64 65 2e 45 4c 45 |Type == |Node.ELE|
|00003760| 4d 45 4e 54 5f 4e 4f 44 | 45 29 20 7b 0a 20 20 20 |MENT_NOD|E) {. |
|00003770| 20 76 61 72 20 6f 77 6e | 65 72 54 61 67 20 20 3d | var own|erTag =|
|00003780| 20 6f 77 6e 65 72 4e 6f | 64 65 2e 6e 6f 64 65 4e | ownerNo|de.nodeN|
|00003790| 61 6d 65 2e 74 6f 4c 6f | 77 65 72 43 61 73 65 28 |ame.toLo|werCase(|
|000037a0| 29 0a 20 20 20 20 76 61 | 72 20 72 65 6c 54 79 70 |). va|r relTyp|
|000037b0| 65 20 20 20 3d 20 6f 77 | 6e 65 72 4e 6f 64 65 2e |e = ow|nerNode.|
|000037c0| 67 65 74 41 74 74 72 69 | 62 75 74 65 28 22 72 65 |getAttri|bute("re|
|000037d0| 6c 22 29 3b 0a 20 20 20 | 20 69 66 20 28 72 65 6c |l");. | if (rel|
|000037e0| 54 79 70 65 29 20 72 65 | 6c 54 79 70 65 20 3d 20 |Type) re|lType = |
|000037f0| 72 65 6c 54 79 70 65 2e | 74 6f 4c 6f 77 65 72 43 |relType.|toLowerC|
|00003800| 61 73 65 28 29 3b 0a 20 | 20 20 20 69 66 20 28 6f |ase();. | if (o|
|00003810| 77 6e 65 72 54 61 67 20 | 3d 3d 20 22 73 74 79 6c |wnerTag |== "styl|
|00003820| 65 22 20 7c 7c 0a 20 20 | 20 20 20 20 20 20 28 6f |e" ||. | (o|
|00003830| 77 6e 65 72 54 61 67 20 | 3d 3d 20 22 6c 69 6e 6b |wnerTag |== "link|
|00003840| 22 20 26 26 20 72 65 6c | 54 79 70 65 2e 69 6e 64 |" && rel|Type.ind|
|00003850| 65 78 4f 66 28 22 73 74 | 79 6c 65 73 68 65 65 74 |exOf("st|ylesheet|
|00003860| 22 29 20 21 3d 20 2d 31 | 29 29 20 7b 0a 0a 20 20 |") != -1|)) {.. |
|00003870| 20 20 20 20 76 61 72 20 | 74 72 65 65 69 74 65 6d | var |treeitem|
|00003880| 20 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 63 72 65 | = docu|ment.cre|
|00003890| 61 74 65 45 6c 65 6d 65 | 6e 74 4e 53 28 58 55 4c |ateEleme|ntNS(XUL|
|000038a0| 5f 4e 53 2c 20 22 74 72 | 65 65 69 74 65 6d 22 29 |_NS, "tr|eeitem")|
|000038b0| 3b 0a 20 20 20 20 20 20 | 76 61 72 20 74 72 65 65 |;. |var tree|
|000038c0| 72 6f 77 20 20 20 3d 20 | 64 6f 63 75 6d 65 6e 74 |row = |document|
|000038d0| 2e 63 72 65 61 74 65 45 | 6c 65 6d 65 6e 74 4e 53 |.createE|lementNS|
|000038e0| 28 58 55 4c 5f 4e 53 2c | 20 22 74 72 65 65 72 6f |(XUL_NS,| "treero|
|000038f0| 77 22 29 3b 0a 20 20 20 | 20 20 20 76 61 72 20 74 |w");. | var t|
|00003900| 72 65 65 63 65 6c 6c 20 | 20 3d 20 64 6f 63 75 6d |reecell | = docum|
|00003910| 65 6e 74 2e 63 72 65 61 | 74 65 45 6c 65 6d 65 6e |ent.crea|teElemen|
|00003920| 74 4e 53 28 58 55 4c 5f | 4e 53 2c 20 22 74 72 65 |tNS(XUL_|NS, "tre|
|00003930| 65 63 65 6c 6c 22 29 3b | 0a 0a 20 20 20 20 20 20 |ecell");|.. |
|00003940| 2f 2f 20 77 68 61 74 20 | 6b 69 6e 64 20 6f 66 20 |// what |kind of |
|00003950| 6f 77 6e 65 72 20 6e 6f | 64 65 20 64 6f 20 77 65 |owner no|de do we|
|00003960| 20 68 61 76 65 20 68 65 | 72 65 20 3f 0a 20 20 20 | have he|re ?. |
|00003970| 20 20 20 2f 2f 20 61 20 | 73 74 79 6c 65 20 65 6c | // a |style el|
|00003980| 65 6d 65 6e 74 20 69 6e | 64 69 63 61 74 65 73 20 |ement in|dicates |
|00003990| 61 6e 20 65 6d 62 65 64 | 64 65 64 20 73 74 79 6c |an embed|ded styl|
|000039a0| 65 73 68 65 65 74 2c 0a | 20 20 20 20 20 20 2f 2f |esheet,.| //|
|000039b0| 20 77 68 69 6c 65 20 61 | 20 6c 69 6e 6b 20 65 6c | while a| link el|
|000039c0| 65 6d 65 6e 74 20 69 6e | 64 69 63 61 74 65 73 20 |ement in|dicates |
|000039d0| 61 6e 20 65 78 74 65 72 | 6e 61 6c 20 73 74 79 6c |an exter|nal styl|
|000039e0| 65 73 68 65 65 74 3b 0a | 20 20 20 20 20 20 2f 2f |esheet;.| //|
|000039f0| 20 74 68 65 20 63 61 73 | 65 20 6f 66 20 61 6e 20 | the cas|e of an |
|00003a00| 58 4d 4c 20 50 72 6f 63 | 65 73 73 69 6e 67 20 49 |XML Proc|essing I|
|00003a10| 6e 73 74 72 75 63 74 69 | 6f 6e 20 69 73 20 6e 6f |nstructi|on is no|
|00003a20| 74 20 68 61 6e 64 6c 65 | 64 2c 20 77 65 0a 20 20 |t handle|d, we. |
|00003a30| 20 20 20 20 2f 2f 20 61 | 72 65 20 73 75 70 70 6f | // a|re suppo|
|00003a40| 73 65 64 20 74 6f 20 62 | 65 20 69 6e 20 48 54 4d |sed to b|e in HTM|
|00003a50| 4c 20 34 0a 20 20 20 20 | 20 20 76 61 72 20 65 78 |L 4. | var ex|
|00003a60| 74 65 72 6e 61 6c 20 3d | 20 66 61 6c 73 65 3b 0a |ternal =| false;.|
|00003a70| 20 20 20 20 20 20 69 66 | 20 28 6f 77 6e 65 72 54 | if| (ownerT|
|00003a80| 61 67 20 3d 3d 20 22 73 | 74 79 6c 65 22 29 20 7b |ag == "s|tyle") {|
|00003a90| 0a 20 20 20 20 20 20 20 | 20 74 72 65 65 63 65 6c |. | treecel|
|00003aa0| 6c 2e 73 65 74 41 74 74 | 72 69 62 75 74 65 28 22 |l.setAtt|ribute("|
|00003ab0| 6c 61 62 65 6c 22 2c 20 | 47 65 74 53 74 72 69 6e |label", |GetStrin|
|00003ac0| 67 28 22 49 6e 74 65 72 | 6e 61 6c 53 74 79 6c 65 |g("Inter|nalStyle|
|00003ad0| 73 68 65 65 74 22 29 29 | 3b 0a 20 20 20 20 20 20 |sheet"))|;. |
|00003ae0| 7d 0a 20 20 20 20 20 20 | 65 6c 73 65 20 69 66 20 |}. |else if |
|00003af0| 28 6f 77 6e 65 72 54 61 | 67 20 3d 3d 20 22 6c 69 |(ownerTa|g == "li|
|00003b00| 6e 6b 22 29 20 7b 0a 20 | 20 20 20 20 20 20 20 2f |nk") {. | /|
|00003b10| 2f 20 65 78 74 65 72 6e | 61 6c 20 73 74 79 6c 65 |/ extern|al style|
|00003b20| 73 68 65 65 74 2c 20 6c | 65 74 27 73 20 70 72 65 |sheet, l|et's pre|
|00003b30| 73 65 6e 74 20 69 74 73 | 20 55 52 4c 20 74 6f 20 |sent its| URL to |
|00003b40| 75 73 65 72 0a 20 20 20 | 20 20 20 20 20 74 72 65 |user. | tre|
|00003b50| 65 63 65 6c 6c 2e 73 65 | 74 41 74 74 72 69 62 75 |ecell.se|tAttribu|
|00003b60| 74 65 28 22 6c 61 62 65 | 6c 22 2c 20 53 74 72 69 |te("labe|l", Stri|
|00003b70| 70 55 73 65 72 6e 61 6d | 65 50 61 73 73 77 6f 72 |pUsernam|ePasswor|
|00003b80| 64 28 6f 77 6e 65 72 4e | 6f 64 65 2e 68 72 65 66 |d(ownerN|ode.href|
|00003b90| 29 29 3b 0a 20 20 20 20 | 20 20 20 20 65 78 74 65 |));. | exte|
|00003ba0| 72 6e 61 6c 20 3d 20 74 | 72 75 65 3b 0a 20 20 20 |rnal = t|rue;. |
|00003bb0| 20 20 20 20 20 69 66 20 | 28 20 2f 28 5c 77 2a 29 | if |( /(\w*)|
|00003bc0| 3a 2e 2a 2f 2e 74 65 73 | 74 28 6f 77 6e 65 72 4e |:.*/.tes|t(ownerN|
|00003bd0| 6f 64 65 2e 68 72 65 66 | 29 20 29 20 7b 0a 20 20 |ode.href|) ) {. |
|00003be0| 20 20 20 20 20 20 20 20 | 69 66 20 28 52 65 67 45 | |if (RegE|
|00003bf0| 78 70 2e 24 31 20 3d 3d | 20 22 66 69 6c 65 22 29 |xp.$1 ==| "file")|
|00003c00| 20 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 65 | {. | e|
|00003c10| 78 74 65 72 6e 61 6c 20 | 3d 20 66 61 6c 73 65 3b |xternal |= false;|
|00003c20| 0a 20 20 20 20 20 20 20 | 20 20 20 7d 0a 20 20 20 |. | }. |
|00003c30| 20 20 20 20 20 7d 0a 20 | 20 20 20 20 20 20 20 65 | }. | e|
|00003c40| 6c 73 65 0a 20 20 20 20 | 20 20 20 20 20 20 65 78 |lse. | ex|
|00003c50| 74 65 72 6e 61 6c 20 3d | 20 66 61 6c 73 65 3b 0a |ternal =| false;.|
|00003c60| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 2f 2f | }.| //|
|00003c70| 20 61 64 64 20 61 20 6e | 65 77 20 65 6e 74 72 79 | add a n|ew entry|
|00003c80| 20 74 6f 20 74 68 65 20 | 74 72 65 65 0a 20 20 20 | to the |tree. |
|00003c90| 20 20 20 76 61 72 20 6f | 20 3d 20 6e 65 77 4f 62 | var o| = newOb|
|00003ca0| 6a 65 63 74 28 20 74 72 | 65 65 69 74 65 6d 2c 20 |ject( tr|eeitem, |
|00003cb0| 65 78 74 65 72 6e 61 6c | 2c 20 53 48 45 45 54 2c |external|, SHEET,|
|00003cc0| 20 6f 77 6e 65 72 4e 6f | 64 65 2e 73 68 65 65 74 | ownerNo|de.sheet|
|00003cd0| 2c 20 66 61 6c 73 65 2c | 20 30 20 29 3b 0a 20 20 |, false,| 0 );. |
|00003ce0| 20 20 20 20 50 75 73 68 | 49 6e 4f 62 6a 65 63 74 | Push|InObject|
|00003cf0| 73 41 72 72 61 79 28 6f | 29 3b 0a 20 20 20 20 20 |sArray(o|);. |
|00003d00| 20 0a 20 20 20 20 20 20 | 74 72 65 65 72 6f 77 2e | . |treerow.|
|00003d10| 61 70 70 65 6e 64 43 68 | 69 6c 64 28 74 72 65 65 |appendCh|ild(tree|
|00003d20| 63 65 6c 6c 29 3b 0a 20 | 20 20 20 20 20 74 72 65 |cell);. | tre|
|00003d30| 65 69 74 65 6d 2e 61 70 | 70 65 6e 64 43 68 69 6c |eitem.ap|pendChil|
|00003d40| 64 28 74 72 65 65 72 6f | 77 29 3b 0a 20 20 20 20 |d(treero|w);. |
|00003d50| 20 20 74 72 65 65 69 74 | 65 6d 2e 73 65 74 41 74 | treeit|em.setAt|
|00003d60| 74 72 69 62 75 74 65 28 | 22 63 6f 6e 74 61 69 6e |tribute(|"contain|
|00003d70| 65 72 22 2c 20 22 74 72 | 75 65 22 29 3b 0a 20 20 |er", "tr|ue");. |
|00003d80| 20 20 20 20 2f 2f 20 61 | 64 64 20 65 6e 74 69 65 | // a|dd entie|
|00003d90| 73 20 74 6f 20 74 68 65 | 20 74 72 65 65 20 66 6f |s to the| tree fo|
|00003da0| 72 20 74 68 65 20 72 75 | 6c 65 73 20 69 6e 20 74 |r the ru|les in t|
|00003db0| 68 65 20 63 75 72 72 65 | 6e 74 20 73 74 79 6c 65 |he curre|nt style|
|00003dc0| 73 68 65 65 74 0a 20 20 | 20 20 20 20 76 61 72 20 |sheet. | var |
|00003dd0| 72 75 6c 65 73 20 3d 20 | 6e 75 6c 6c 3b 0a 20 20 |rules = |null;. |
|00003de0| 20 20 20 20 69 66 20 28 | 6f 77 6e 65 72 4e 6f 64 | if (|ownerNod|
|00003df0| 65 2e 73 68 65 65 74 29 | 0a 20 20 20 20 20 20 20 |e.sheet)|. |
|00003e00| 20 72 75 6c 65 73 20 3d | 20 6f 77 6e 65 72 4e 6f | rules =| ownerNo|
|00003e10| 64 65 2e 73 68 65 65 74 | 2e 63 73 73 52 75 6c 65 |de.sheet|.cssRule|
|00003e20| 73 3b 0a 20 20 20 20 20 | 20 41 64 64 52 75 6c 65 |s;. | AddRule|
|00003e30| 73 54 6f 54 72 65 65 63 | 68 69 6c 64 72 65 6e 28 |sToTreec|hildren(|
|00003e40| 74 72 65 65 69 74 65 6d | 2c 20 72 75 6c 65 73 2c |treeitem|, rules,|
|00003e50| 20 65 78 74 65 72 6e 61 | 6c 2c 20 31 29 3b 0a 0a | externa|l, 1);..|
|00003e60| 20 20 20 20 20 20 73 68 | 65 65 74 73 54 72 65 65 | sh|eetsTree|
|00003e70| 2e 61 70 70 65 6e 64 43 | 68 69 6c 64 28 74 72 65 |.appendC|hild(tre|
|00003e80| 65 69 74 65 6d 29 3b 0a | 20 20 20 20 7d 0a 20 20 |eitem);.| }. |
|00003e90| 7d 0a 7d 0a 0a 66 75 6e | 63 74 69 6f 6e 20 50 75 |}.}..fun|ction Pu|
|00003ea0| 73 68 49 6e 4f 62 6a 65 | 63 74 73 41 72 72 61 79 |shInObje|ctsArray|
|00003eb0| 28 6f 29 0a 7b 0a 20 20 | 69 66 20 28 67 49 6e 73 |(o).{. |if (gIns|
|00003ec0| 65 72 74 49 6e 64 65 78 | 20 3d 3d 20 2d 31 29 0a |ertIndex| == -1).|
|00003ed0| 20 20 20 20 6f 62 6a 65 | 63 74 73 41 72 72 61 79 | obje|ctsArray|
|00003ee0| 2e 70 75 73 68 28 6f 29 | 3b 0a 20 20 65 6c 73 65 |.push(o)|;. else|
|00003ef0| 20 7b 0a 20 20 20 20 6f | 62 6a 65 63 74 73 41 72 | {. o|bjectsAr|
|00003f00| 72 61 79 2e 73 70 6c 69 | 63 65 28 67 49 6e 73 65 |ray.spli|ce(gInse|
|00003f10| 72 74 49 6e 64 65 78 2c | 20 30 2c 20 6f 29 3b 0a |rtIndex,| 0, o);.|
|00003f20| 20 20 20 20 67 49 6e 73 | 65 72 74 49 6e 64 65 78 | gIns|ertIndex|
|00003f30| 2b 2b 3b 0a 20 20 7d 0a | 7d 0a 0a 2f 2f 20 2a 20 |++;. }.|}..// * |
|00003f40| 70 6f 70 75 6c 61 74 65 | 73 20 74 68 65 20 74 72 |populate|s the tr|
|00003f50| 65 65 20 69 6e 20 74 68 | 65 20 64 69 61 6c 6f 67 |ee in th|e dialog|
|00003f60| 20 77 69 74 68 20 65 6e | 74 72 69 65 73 0a 2f 2f | with en|tries.//|
|00003f70| 20 20 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | corre|sponding|
|00003f80| 20 74 6f 20 61 6c 6c 20 | 73 74 79 6c 65 73 68 65 | to all |styleshe|
|00003f90| 65 74 73 20 61 6e 64 20 | 63 73 73 20 72 75 6c 65 |ets and |css rule|
|00003fa0| 73 20 61 74 74 61 63 68 | 65 64 20 74 6f 0a 2f 2f |s attach|ed to.//|
|00003fb0| 20 20 20 64 6f 63 75 6d | 65 6e 74 0a 2f 2f 20 20 | docum|ent.// |
|00003fc0| 20 70 61 72 61 6d 20 58 | 55 4c 45 6c 65 6d 65 6e | param X|ULElemen|
|00003fd0| 74 20 73 68 65 65 74 73 | 54 72 65 65 0a 66 75 6e |t sheets|Tree.fun|
|00003fe0| 63 74 69 6f 6e 20 49 6e | 69 74 53 68 65 65 74 73 |ction In|itSheets|
|00003ff0| 54 72 65 65 28 73 68 65 | 65 74 73 54 72 65 65 29 |Tree(she|etsTree)|
|00004000| 0a 7b 0a 20 20 2f 2f 20 | 72 65 6d 6f 76 65 20 61 |.{. // |remove a|
|00004010| 6c 6c 20 65 6e 74 72 69 | 65 73 20 69 6e 20 74 68 |ll entri|es in th|
|00004020| 65 20 74 72 65 65 0a 20 | 20 43 6c 65 61 6e 53 68 |e tree. | CleanSh|
|00004030| 65 65 74 73 54 72 65 65 | 28 73 68 65 65 74 73 54 |eetsTree|(sheetsT|
|00004040| 72 65 65 29 3b 0a 20 20 | 2f 2f 20 4c 6f 6f 6b 20 |ree);. |// Look |
|00004050| 66 6f 72 20 74 68 65 20 | 73 74 79 6c 65 73 68 65 |for the |styleshe|
|00004060| 65 74 73 20 61 74 74 61 | 63 68 65 64 20 74 6f 20 |ets atta|ched to |
|00004070| 74 68 65 20 63 75 72 72 | 65 6e 74 20 64 6f 63 75 |the curr|ent docu|
|00004080| 6d 65 6e 74 0a 20 20 2f | 2f 20 47 65 74 20 74 68 |ment. /|/ Get th|
|00004090| 65 6d 20 66 72 6f 6d 20 | 74 68 65 20 53 54 59 4c |em from |the STYL|
|000040a0| 45 20 61 6e 64 20 4c 49 | 4e 4b 20 65 6c 65 6d 65 |E and LI|NK eleme|
|000040b0| 6e 74 73 20 62 65 63 61 | 75 73 65 20 6f 66 20 61 |nts beca|use of a|
|000040c0| 73 79 6e 63 20 73 68 65 | 65 74 20 6c 6f 61 64 69 |sync she|et loadi|
|000040d0| 6e 67 20 3a 0a 20 20 2f | 2f 20 74 68 65 20 4c 49 |ng :. /|/ the LI|
|000040e0| 4e 4b 20 65 6c 65 6d 65 | 6e 74 20 69 73 20 61 6c |NK eleme|nt is al|
|000040f0| 77 61 79 73 20 68 65 72 | 65 20 77 68 69 6c 65 20 |ways her|e while |
|00004100| 74 68 65 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |the corr|espondin|
|00004110| 67 20 73 68 65 65 74 20 | 6d 69 67 68 74 20 62 65 |g sheet |might be|
|00004120| 0a 20 20 2f 2f 20 64 65 | 6c 61 79 65 64 20 62 79 |. // de|layed by|
|00004130| 20 6e 65 74 77 6f 72 6b | 0a 20 20 76 61 72 20 68 | network|. var h|
|00004140| 65 61 64 4e 6f 64 65 20 | 3d 20 47 65 74 48 65 61 |eadNode |= GetHea|
|00004150| 64 45 6c 65 6d 65 6e 74 | 28 29 3b 0a 20 20 69 66 |dElement|();. if|
|00004160| 20 28 20 68 65 61 64 4e | 6f 64 65 20 26 26 20 68 | ( headN|ode && h|
|00004170| 65 61 64 4e 6f 64 65 2e | 68 61 73 43 68 69 6c 64 |eadNode.|hasChild|
|00004180| 4e 6f 64 65 73 28 29 20 | 29 20 7b 0a 20 20 20 20 |Nodes() |) {. |
|00004190| 76 61 72 20 73 73 6e 20 | 3d 20 68 65 61 64 4e 6f |var ssn |= headNo|
|000041a0| 64 65 2e 63 68 69 6c 64 | 4e 6f 64 65 73 2e 6c 65 |de.child|Nodes.le|
|000041b0| 6e 67 74 68 3b 0a 20 20 | 20 20 6f 62 6a 65 63 74 |ngth;. | object|
|000041c0| 73 41 72 72 61 79 20 3d | 20 6e 65 77 20 41 72 72 |sArray =| new Arr|
|000041d0| 61 79 28 29 3b 0a 20 20 | 20 20 69 66 20 28 73 73 |ay();. | if (ss|
|000041e0| 6e 29 20 7b 0a 20 20 20 | 20 20 20 76 61 72 20 69 |n) {. | var i|
|000041f0| 3b 0a 20 20 20 20 20 20 | 67 49 6e 73 65 72 74 49 |;. |gInsertI|
|00004200| 6e 64 65 78 20 3d 20 2d | 31 3b 0a 20 20 20 20 20 |ndex = -|1;. |
|00004210| 20 66 6f 72 20 28 69 3d | 30 3b 20 69 3c 73 73 6e | for (i=|0; i<ssn|
|00004220| 3b 20 69 2b 2b 29 20 7b | 0a 20 20 20 20 20 20 20 |; i++) {|. |
|00004230| 20 76 61 72 20 6f 77 6e | 65 72 4e 6f 64 65 20 3d | var own|erNode =|
|00004240| 20 68 65 61 64 4e 6f 64 | 65 2e 63 68 69 6c 64 4e | headNod|e.childN|
|00004250| 6f 64 65 73 5b 69 5d 3b | 0a 20 20 20 20 20 20 20 |odes[i];|. |
|00004260| 20 41 64 64 53 68 65 65 | 74 45 6e 74 72 79 54 6f | AddShee|tEntryTo|
|00004270| 54 72 65 65 28 73 68 65 | 65 74 73 54 72 65 65 2c |Tree(she|etsTree,|
|00004280| 20 6f 77 6e 65 72 4e 6f | 64 65 29 3b 20 0a 20 20 | ownerNo|de); . |
|00004290| 20 20 20 20 7d 0a 20 20 | 20 20 7d 0a 20 20 7d 0a | }. | }. }.|
|000042a0| 7d 0a 0a 2f 2f 20 2a 20 | 63 72 65 61 74 65 20 61 |}..// * |create a|
|000042b0| 20 6e 65 77 20 22 6f 62 | 6a 65 63 74 22 20 63 6f | new "ob|ject" co|
|000042c0| 72 72 65 73 70 6f 6e 64 | 69 6e 67 20 74 6f 20 61 |rrespond|ing to a|
|000042d0| 6e 20 65 6e 74 72 79 20 | 69 6e 20 74 68 65 20 74 |n entry |in the t|
|000042e0| 72 65 65 0a 2f 2f 20 20 | 20 75 6e 66 6f 72 74 75 |ree.// | unfortu|
|000042f0| 6e 61 74 65 6c 79 2c 20 | 69 74 27 73 20 73 74 69 |nately, |it's sti|
|00004300| 6c 6c 20 69 6d 70 6f 73 | 73 69 62 6c 65 20 74 6f |ll impos|sible to|
|00004310| 20 61 74 74 61 63 68 20 | 61 20 4a 53 20 6f 62 6a | attach |a JS obj|
|00004320| 65 63 74 20 74 6f 0a 2f | 2f 20 20 20 61 20 74 72 |ect to./|/ a tr|
|00004330| 65 65 63 65 6c 6c 20 3a | 2d 28 0a 2f 2f 20 20 20 |eecell :|-(.// |
|00004340| 70 61 72 61 6d 20 58 55 | 4c 45 6c 65 6d 65 6e 74 |param XU|LElement|
|00004350| 20 78 75 6c 45 6c 74 0a | 2f 2f 20 20 20 70 61 72 | xulElt.|// par|
|00004360| 61 6d 20 62 6f 6f 6c 65 | 61 6e 20 65 78 74 65 72 |am boole|an exter|
|00004370| 6e 61 6c 0a 2f 2f 20 20 | 20 70 61 72 61 6d 20 69 |nal.// | param i|
|00004380| 6e 74 65 67 65 72 20 74 | 79 70 65 0a 2f 2f 20 20 |nteger t|ype.// |
|00004390| 20 70 61 72 61 6d 20 28 | 44 4f 4d 4e 6f 64 65 7c | param (|DOMNode||
|000043a0| 44 4f 4d 43 53 53 53 74 | 79 6c 65 53 68 65 65 74 |DOMCSSSt|yleSheet|
|000043b0| 7c 44 4f 4d 43 53 53 52 | 75 6c 65 29 20 63 73 73 ||DOMCSSR|ule) css|
|000043c0| 45 6c 74 0a 2f 2f 20 20 | 20 70 61 72 61 6d 20 62 |Elt.// | param b|
|000043d0| 6f 6f 6c 65 61 6e 20 6d | 6f 64 69 66 69 65 64 0a |oolean m|odified.|
|000043e0| 2f 2f 20 20 20 70 61 72 | 61 6d 20 69 6e 74 65 67 |// par|am integ|
|000043f0| 65 72 20 64 65 70 74 68 | 0a 66 75 6e 63 74 69 6f |er depth|.functio|
|00004400| 6e 20 6e 65 77 4f 62 6a | 65 63 74 28 20 78 75 6c |n newObj|ect( xul|
|00004410| 45 6c 74 2c 20 65 78 74 | 65 72 6e 61 6c 2c 20 74 |Elt, ext|ernal, t|
|00004420| 79 70 65 2c 20 63 73 73 | 45 6c 74 2c 20 6d 6f 64 |ype, css|Elt, mod|
|00004430| 69 66 69 65 64 2c 20 64 | 65 70 74 68 29 0a 7b 0a |ified, d|epth).{.|
|00004440| 20 20 72 65 74 75 72 6e | 20 7b 78 75 6c 45 6c 74 | return| {xulElt|
|00004450| 3a 78 75 6c 45 6c 74 2c | 0a 20 20 20 20 20 20 20 |:xulElt,|. |
|00004460| 20 20 20 65 78 74 65 72 | 6e 61 6c 3a 65 78 74 65 | exter|nal:exte|
|00004470| 72 6e 61 6c 2c 0a 20 20 | 20 20 20 20 20 20 20 20 |rnal,. | |
|00004480| 74 79 70 65 3a 74 79 70 | 65 2c 0a 20 20 20 20 20 |type:typ|e,. |
|00004490| 20 20 20 20 20 63 73 73 | 45 6c 74 3a 63 73 73 45 | css|Elt:cssE|
|000044a0| 6c 74 2c 0a 20 20 20 20 | 20 20 20 20 20 20 6d 6f |lt,. | mo|
|000044b0| 64 69 66 69 65 64 3a 6d | 6f 64 69 66 69 65 64 2c |dified:m|odified,|
|000044c0| 0a 20 20 20 20 20 20 20 | 20 20 20 64 65 70 74 68 |. | depth|
|000044d0| 3a 64 65 70 74 68 7d 3b | 0a 7d 0a 0a 66 75 6e 63 |:depth};|.}..func|
|000044e0| 74 69 6f 6e 20 41 64 64 | 53 74 79 6c 65 52 75 6c |tion Add|StyleRul|
|000044f0| 65 54 6f 54 72 65 65 43 | 68 69 6c 64 72 65 6e 28 |eToTreeC|hildren(|
|00004500| 72 75 6c 65 2c 20 65 78 | 74 65 72 6e 61 6c 2c 20 |rule, ex|ternal, |
|00004510| 64 65 70 74 68 29 0a 7b | 0a 20 20 76 61 72 20 73 |depth).{|. var s|
|00004520| 75 62 74 72 65 65 69 74 | 65 6d 20 20 3d 20 64 6f |ubtreeit|em = do|
|00004530| 63 75 6d 65 6e 74 2e 63 | 72 65 61 74 65 45 6c 65 |cument.c|reateEle|
|00004540| 6d 65 6e 74 4e 53 28 58 | 55 4c 5f 4e 53 2c 20 22 |mentNS(X|UL_NS, "|
|00004550| 74 72 65 65 69 74 65 6d | 22 29 3b 0a 20 20 76 61 |treeitem|");. va|
|00004560| 72 20 73 75 62 74 72 65 | 65 72 6f 77 20 20 20 3d |r subtre|erow =|
|00004570| 20 64 6f 63 75 6d 65 6e | 74 2e 63 72 65 61 74 65 | documen|t.create|
|00004580| 45 6c 65 6d 65 6e 74 4e | 53 28 58 55 4c 5f 4e 53 |ElementN|S(XUL_NS|
|00004590| 2c 20 22 74 72 65 65 72 | 6f 77 22 29 3b 0a 20 20 |, "treer|ow");. |
|000045a0| 76 61 72 20 73 75 62 74 | 72 65 65 63 65 6c 6c 20 |var subt|reecell |
|000045b0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 63 72 65 61 | = docum|ent.crea|
|000045c0| 74 65 45 6c 65 6d 65 6e | 74 4e 53 28 58 55 4c 5f |teElemen|tNS(XUL_|
|000045d0| 4e 53 2c 20 22 74 72 65 | 65 63 65 6c 6c 22 29 3b |NS, "tre|ecell");|
|000045e0| 0a 20 20 2f 2f 20 73 68 | 6f 77 20 74 68 65 20 73 |. // sh|ow the s|
|000045f0| 65 6c 65 63 74 6f 72 20 | 61 74 74 61 63 68 65 64 |elector |attached|
|00004600| 20 74 6f 20 74 68 65 20 | 72 75 6c 65 0a 20 20 73 | to the |rule. s|
|00004610| 75 62 74 72 65 65 63 65 | 6c 6c 2e 73 65 74 41 74 |ubtreece|ll.setAt|
|00004620| 74 72 69 62 75 74 65 28 | 22 6c 61 62 65 6c 22 2c |tribute(|"label",|
|00004630| 20 72 75 6c 65 2e 73 65 | 6c 65 63 74 6f 72 54 65 | rule.se|lectorTe|
|00004640| 78 74 29 3b 0a 20 20 76 | 61 72 20 6f 20 3d 20 6e |xt);. v|ar o = n|
|00004650| 65 77 4f 62 6a 65 63 74 | 28 20 73 75 62 74 72 65 |ewObject|( subtre|
|00004660| 65 69 74 65 6d 2c 20 65 | 78 74 65 72 6e 61 6c 2c |eitem, e|xternal,|
|00004670| 20 53 54 59 4c 45 5f 52 | 55 4c 45 2c 20 72 75 6c | STYLE_R|ULE, rul|
|00004680| 65 2c 20 66 61 6c 73 65 | 2c 20 64 65 70 74 68 20 |e, false|, depth |
|00004690| 29 3b 0a 20 20 50 75 73 | 68 49 6e 4f 62 6a 65 63 |);. Pus|hInObjec|
|000046a0| 74 73 41 72 72 61 79 28 | 6f 29 3b 0a 20 20 69 66 |tsArray(|o);. if|
|000046b0| 20 28 65 78 74 65 72 6e | 61 6c 29 20 7b 0a 20 20 | (extern|al) {. |
|000046c0| 20 20 73 75 62 74 72 65 | 65 63 65 6c 6c 2e 73 65 | subtre|ecell.se|
|000046d0| 74 41 74 74 72 69 62 75 | 74 65 28 22 70 72 6f 70 |tAttribu|te("prop|
|000046e0| 65 72 74 69 65 73 22 2c | 20 22 65 78 74 65 72 6e |erties",| "extern|
|000046f0| 61 6c 22 29 3b 0a 20 20 | 7d 0a 20 20 73 75 62 74 |al");. |}. subt|
|00004700| 72 65 65 72 6f 77 2e 61 | 70 70 65 6e 64 43 68 69 |reerow.a|ppendChi|
|00004710| 6c 64 28 73 75 62 74 72 | 65 65 63 65 6c 6c 29 3b |ld(subtr|eecell);|
|00004720| 0a 20 20 73 75 62 74 72 | 65 65 69 74 65 6d 2e 61 |. subtr|eeitem.a|
|00004730| 70 70 65 6e 64 43 68 69 | 6c 64 28 73 75 62 74 72 |ppendChi|ld(subtr|
|00004740| 65 65 72 6f 77 29 3b 0a | 0a 20 20 72 65 74 75 72 |eerow);.|. retur|
|00004750| 6e 20 73 75 62 74 72 65 | 65 69 74 65 6d 3b 0a 7d |n subtre|eitem;.}|
|00004760| 0a 0a 66 75 6e 63 74 69 | 6f 6e 20 41 64 64 50 61 |..functi|on AddPa|
|00004770| 67 65 52 75 6c 65 54 6f | 54 72 65 65 43 68 69 6c |geRuleTo|TreeChil|
|00004780| 64 72 65 6e 28 72 75 6c | 65 2c 20 65 78 74 65 72 |dren(rul|e, exter|
|00004790| 6e 61 6c 2c 20 64 65 70 | 74 68 29 0a 7b 0a 20 20 |nal, dep|th).{. |
|000047a0| 76 61 72 20 73 75 62 74 | 72 65 65 69 74 65 6d 20 |var subt|reeitem |
|000047b0| 20 3d 20 64 6f 63 75 6d | 65 6e 74 2e 63 72 65 61 | = docum|ent.crea|
|000047c0| 74 65 45 6c 65 6d 65 6e | 74 4e 53 28 58 55 4c 5f |teElemen|tNS(XUL_|
|000047d0| 4e 53 2c 20 22 74 72 65 | 65 69 74 65 6d 22 29 3b |NS, "tre|eitem");|
|000047e0| 0a 20 20 76 61 72 20 73 | 75 62 74 72 65 65 72 6f |. var s|ubtreero|
|000047f0| 77 20 20 20 3d 20 64 6f | 63 75 6d 65 6e 74 2e 63 |w = do|cument.c|
|00004800| 72 65 61 74 65 45 6c 65 | 6d 65 6e 74 4e 53 28 58 |reateEle|mentNS(X|
|00004810| 55 4c 5f 4e 53 2c 20 22 | 74 72 65 65 72 6f 77 22 |UL_NS, "|treerow"|
|00004820| 29 3b 0a 20 20 76 61 72 | 20 73 75 62 74 72 65 65 |);. var| subtree|
|00004830| 63 65 6c 6c 20 20 3d 20 | 64 6f 63 75 6d 65 6e 74 |cell = |document|
|00004840| 2e 63 72 65 61 74 65 45 | 6c 65 6d 65 6e 74 4e 53 |.createE|lementNS|
|00004850| 28 58 55 4c 5f 4e 53 2c | 20 22 74 72 65 65 63 65 |(XUL_NS,| "treece|
|00004860| 6c 6c 22 29 3b 0a 20 20 | 2f 2f 20 73 68 6f 77 20 |ll");. |// show |
|00004870| 74 68 65 20 73 65 6c 65 | 63 74 6f 72 20 61 74 74 |the sele|ctor att|
|00004880| 61 63 68 65 64 20 74 6f | 20 74 68 65 20 72 75 6c |ached to| the rul|
|00004890| 65 0a 20 20 73 75 62 74 | 72 65 65 63 65 6c 6c 2e |e. subt|reecell.|
|000048a0| 73 65 74 41 74 74 72 69 | 62 75 74 65 28 22 6c 61 |setAttri|bute("la|
|000048b0| 62 65 6c 22 2c 20 22 40 | 70 61 67 65 20 22 20 2b |bel", "@|page " +|
|000048c0| 20 72 75 6c 65 2e 73 65 | 6c 65 63 74 6f 72 54 65 | rule.se|lectorTe|
|000048d0| 78 74 29 3b 0a 20 20 76 | 61 72 20 6f 20 3d 20 6e |xt);. v|ar o = n|
|000048e0| 65 77 4f 62 6a 65 63 74 | 28 20 73 75 62 74 72 65 |ewObject|( subtre|
|000048f0| 65 69 74 65 6d 2c 20 65 | 78 74 65 72 6e 61 6c 2c |eitem, e|xternal,|
|00004900| 20 50 41 47 45 5f 52 55 | 4c 45 2c 20 72 75 6c 65 | PAGE_RU|LE, rule|
|00004910| 2c 20 66 61 6c 73 65 2c | 20 64 65 70 74 68 20 29 |, false,| depth )|
|00004920| 3b 0a 20 20 50 75 73 68 | 49 6e 4f 62 6a 65 63 74 |;. Push|InObject|
|00004930| 73 41 72 72 61 79 28 6f | 29 3b 0a 20 20 69 66 20 |sArray(o|);. if |
|00004940| 28 65 78 74 65 72 6e 61 | 6c 29 20 7b 0a 20 20 20 |(externa|l) {. |
|00004950| 20 73 75 62 74 72 65 65 | 63 65 6c 6c 2e 73 65 74 | subtree|cell.set|
|00004960| 41 74 74 72 69 62 75 74 | 65 28 22 70 72 6f 70 65 |Attribut|e("prope|
|00004970| 72 74 69 65 73 22 2c 20 | 22 65 78 74 65 72 6e 61 |rties", |"externa|
|00004980| 6c 22 29 3b 0a 20 20 7d | 0a 20 20 73 75 62 74 72 |l");. }|. subtr|
|00004990| 65 65 72 6f 77 2e 61 70 | 70 65 6e 64 43 68 69 6c |eerow.ap|pendChil|
|000049a0| 64 28 73 75 62 74 72 65 | 65 63 65 6c 6c 29 3b 0a |d(subtre|ecell);.|
|000049b0| 20 20 73 75 62 74 72 65 | 65 69 74 65 6d 2e 61 70 | subtre|eitem.ap|
|000049c0| 70 65 6e 64 43 68 69 6c | 64 28 73 75 62 74 72 65 |pendChil|d(subtre|
|000049d0| 65 72 6f 77 29 3b 0a 0a | 20 20 72 65 74 75 72 6e |erow);..| return|
|000049e0| 20 73 75 62 74 72 65 65 | 69 74 65 6d 3b 0a 7d 0a | subtree|item;.}.|
|000049f0| 0a 66 75 6e 63 74 69 6f | 6e 20 41 64 64 49 6d 70 |.functio|n AddImp|
|00004a00| 6f 72 74 52 75 6c 65 54 | 6f 54 72 65 65 43 68 69 |ortRuleT|oTreeChi|
|00004a10| 6c 64 72 65 6e 28 72 75 | 6c 65 2c 20 65 78 74 65 |ldren(ru|le, exte|
|00004a20| 72 6e 61 6c 2c 20 64 65 | 70 74 68 29 0a 7b 0a 20 |rnal, de|pth).{. |
|00004a30| 20 76 61 72 20 73 75 62 | 74 72 65 65 69 74 65 6d | var sub|treeitem|
|00004a40| 20 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 63 72 65 | = docu|ment.cre|
|00004a50| 61 74 65 45 6c 65 6d 65 | 6e 74 4e 53 28 58 55 4c |ateEleme|ntNS(XUL|
|00004a60| 5f 4e 53 2c 20 22 74 72 | 65 65 69 74 65 6d 22 29 |_NS, "tr|eeitem")|
|00004a70| 3b 0a 20 20 76 61 72 20 | 73 75 62 74 72 65 65 72 |;. var |subtreer|
|00004a80| 6f 77 20 20 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e |ow = d|ocument.|
|00004a90| 63 72 65 61 74 65 45 6c | 65 6d 65 6e 74 4e 53 28 |createEl|ementNS(|
|00004aa0| 58 55 4c 5f 4e 53 2c 20 | 22 74 72 65 65 72 6f 77 |XUL_NS, |"treerow|
|00004ab0| 22 29 3b 0a 20 20 76 61 | 72 20 73 75 62 74 72 65 |");. va|r subtre|
|00004ac0| 65 63 65 6c 6c 20 20 3d | 20 64 6f 63 75 6d 65 6e |ecell =| documen|
|00004ad0| 74 2e 63 72 65 61 74 65 | 45 6c 65 6d 65 6e 74 4e |t.create|ElementN|
|00004ae0| 53 28 58 55 4c 5f 4e 53 | 2c 20 22 74 72 65 65 63 |S(XUL_NS|, "treec|
|00004af0| 65 6c 6c 22 29 3b 0a 20 | 20 2f 2f 20 73 68 6f 77 |ell");. | // show|
|00004b00| 20 22 40 69 6d 70 6f 72 | 74 22 20 61 6e 64 20 74 | "@impor|t" and t|
|00004b10| 68 65 20 55 52 4c 0a 20 | 20 73 75 62 74 72 65 65 |he URL. | subtree|
|00004b20| 63 65 6c 6c 2e 73 65 74 | 41 74 74 72 69 62 75 74 |cell.set|Attribut|
|00004b30| 65 28 22 6c 61 62 65 6c | 22 2c 20 22 40 69 6d 70 |e("label|", "@imp|
|00004b40| 6f 72 74 20 22 2b 72 75 | 6c 65 2e 68 72 65 66 2c |ort "+ru|le.href,|
|00004b50| 20 65 78 74 65 72 6e 61 | 6c 29 3b 0a 20 20 76 61 | externa|l);. va|
|00004b60| 72 20 6f 20 3d 20 6e 65 | 77 4f 62 6a 65 63 74 28 |r o = ne|wObject(|
|00004b70| 20 73 75 62 74 72 65 65 | 69 74 65 6d 2c 20 65 78 | subtree|item, ex|
|00004b80| 74 65 72 6e 61 6c 2c 20 | 49 4d 50 4f 52 54 5f 52 |ternal, |IMPORT_R|
|00004b90| 55 4c 45 2c 20 72 75 6c | 65 2c 20 66 61 6c 73 65 |ULE, rul|e, false|
|00004ba0| 2c 20 64 65 70 74 68 20 | 29 3b 0a 20 20 50 75 73 |, depth |);. Pus|
|00004bb0| 68 49 6e 4f 62 6a 65 63 | 74 73 41 72 72 61 79 28 |hInObjec|tsArray(|
|00004bc0| 6f 29 3b 0a 20 20 69 66 | 20 28 65 78 74 65 72 6e |o);. if| (extern|
|00004bd0| 61 6c 29 20 7b 0a 20 20 | 20 20 73 75 62 74 72 65 |al) {. | subtre|
|00004be0| 65 63 65 6c 6c 2e 73 65 | 74 41 74 74 72 69 62 75 |ecell.se|tAttribu|
|00004bf0| 74 65 28 22 70 72 6f 70 | 65 72 74 69 65 73 22 2c |te("prop|erties",|
|00004c00| 20 22 65 78 74 65 72 6e | 61 6c 22 29 3b 0a 20 20 | "extern|al");. |
|00004c10| 7d 0a 20 20 73 75 62 74 | 72 65 65 72 6f 77 2e 61 |}. subt|reerow.a|
|00004c20| 70 70 65 6e 64 43 68 69 | 6c 64 28 73 75 62 74 72 |ppendChi|ld(subtr|
|00004c30| 65 65 63 65 6c 6c 29 3b | 0a 20 20 73 75 62 74 72 |eecell);|. subtr|
|00004c40| 65 65 69 74 65 6d 2e 61 | 70 70 65 6e 64 43 68 69 |eeitem.a|ppendChi|
|00004c50| 6c 64 28 73 75 62 74 72 | 65 65 72 6f 77 29 3b 0a |ld(subtr|eerow);.|
|00004c60| 20 20 73 75 62 74 72 65 | 65 69 74 65 6d 2e 73 65 | subtre|eitem.se|
|00004c70| 74 41 74 74 72 69 62 75 | 74 65 28 22 63 6f 6e 74 |tAttribu|te("cont|
|00004c80| 61 69 6e 65 72 22 2c 20 | 22 74 72 75 65 22 29 3b |ainer", |"true");|
|00004c90| 0a 20 20 69 66 20 28 72 | 75 6c 65 2e 73 74 79 6c |. if (r|ule.styl|
|00004ca0| 65 53 68 65 65 74 29 20 | 7b 0a 20 20 20 20 2f 2f |eSheet) |{. //|
|00004cb0| 20 69 66 20 77 65 20 68 | 61 76 65 20 61 20 73 74 | if we h|ave a st|
|00004cc0| 79 6c 65 73 68 65 65 74 | 20 72 65 61 6c 6c 79 20 |ylesheet| really |
|00004cd0| 69 6d 70 6f 72 74 65 64 | 2c 20 6c 65 74 27 73 20 |imported|, let's |
|00004ce0| 62 72 6f 77 73 65 20 69 | 74 20 74 6f 6f 0a 20 20 |browse i|t too. |
|00004cf0| 20 20 2f 2f 20 69 6e 63 | 72 65 61 73 69 6e 67 20 | // inc|reasing |
|00004d00| 74 68 65 20 64 65 70 74 | 68 20 61 6e 64 20 6d 61 |the dept|h and ma|
|00004d10| 72 6b 69 6e 67 20 65 78 | 74 65 72 6e 61 6c 0a 20 |rking ex|ternal. |
|00004d20| 20 20 20 41 64 64 52 75 | 6c 65 73 54 6f 54 72 65 | AddRu|lesToTre|
|00004d30| 65 63 68 69 6c 64 72 65 | 6e 28 73 75 62 74 72 65 |echildre|n(subtre|
|00004d40| 65 69 74 65 6d 20 2c 20 | 72 75 6c 65 2e 73 74 79 |eitem , |rule.sty|
|00004d50| 6c 65 53 68 65 65 74 2e | 63 73 73 52 75 6c 65 73 |leSheet.|cssRules|
|00004d60| 2c 20 74 72 75 65 2c 20 | 64 65 70 74 68 2b 31 29 |, true, |depth+1)|
|00004d70| 3b 0a 20 20 7d 0a 20 20 | 72 65 74 75 72 6e 20 73 |;. }. |return s|
|00004d80| 75 62 74 72 65 65 69 74 | 65 6d 3b 0a 7d 0a 0a 2f |ubtreeit|em;.}../|
|00004d90| 2f 20 2a 20 61 64 64 73 | 20 73 75 62 74 72 65 65 |/ * adds| subtree|
|00004da0| 69 74 65 6d 73 20 66 6f | 72 20 74 68 65 20 43 53 |items fo|r the CS|
|00004db0| 53 20 72 75 6c 65 73 20 | 66 6f 75 6e 64 0a 2f 2f |S rules |found.//|
|00004dc0| 20 20 20 69 6e 74 6f 20 | 72 75 6c 65 73 3b 20 69 | into |rules; i|
|00004dd0| 6e 20 63 61 73 65 20 6f | 66 20 61 6e 20 61 74 2d |n case o|f an at-|
|00004de0| 72 75 6c 65 2c 20 74 68 | 65 20 6d 65 74 68 6f 64 |rule, th|e method|
|00004df0| 20 63 61 6c 6c 73 20 69 | 74 73 65 6c 66 20 77 69 | calls i|tself wi|
|00004e00| 74 68 0a 2f 2f 20 20 20 | 61 20 73 75 62 74 72 65 |th.// |a subtre|
|00004e10| 65 69 74 65 6d 2c 20 74 | 68 65 20 72 75 6c 65 73 |eitem, t|he rules|
|00004e20| 20 69 6e 20 74 68 65 20 | 61 74 2d 72 75 6c 65 2c | in the |at-rule,|
|00004e30| 20 61 20 62 6f 6f 6c 65 | 61 6e 20 73 70 65 63 69 | a boole|an speci|
|00004e40| 66 79 69 6e 67 20 69 66 | 0a 2f 2f 20 20 20 74 68 |fying if|.// th|
|00004e50| 65 20 72 75 6c 65 73 20 | 61 72 65 20 65 78 74 65 |e rules |are exte|
|00004e60| 72 6e 61 6c 20 74 6f 20 | 74 68 65 20 64 6f 63 75 |rnal to |the docu|
|00004e70| 6d 65 6e 74 20 6f 72 20 | 6e 6f 74 2c 20 61 6e 64 |ment or |not, and|
|00004e80| 20 61 6e 20 69 6e 63 72 | 65 61 73 65 64 0a 2f 2f | an incr|eased.//|
|00004e90| 20 20 20 64 65 70 74 68 | 2e 0a 2f 2f 20 20 20 70 | depth|..// p|
|00004ea0| 61 72 61 6d 20 58 55 4c | 45 6c 65 6d 65 6e 74 20 |aram XUL|Element |
|00004eb0| 20 74 72 65 65 49 74 65 | 6d 0a 2f 2f 20 20 20 70 | treeIte|m.// p|
|00004ec0| 61 72 61 6d 20 43 53 53 | 52 75 6c 65 4c 69 73 74 |aram CSS|RuleList|
|00004ed0| 20 72 75 6c 65 73 0a 2f | 2f 20 20 20 70 61 72 61 | rules./|/ para|
|00004ee0| 6d 20 62 6f 6f 6c 65 61 | 6e 20 20 20 20 20 65 78 |m boolea|n ex|
|00004ef0| 74 65 72 6e 61 6c 0a 2f | 2f 20 20 20 70 61 72 61 |ternal./|/ para|
|00004f00| 6d 20 69 6e 74 65 67 65 | 72 20 20 20 20 20 64 65 |m intege|r de|
|00004f10| 70 74 68 0a 66 75 6e 63 | 74 69 6f 6e 20 41 64 64 |pth.func|tion Add|
|00004f20| 52 75 6c 65 73 54 6f 54 | 72 65 65 63 68 69 6c 64 |RulesToT|reechild|
|00004f30| 72 65 6e 28 74 72 65 65 | 49 74 65 6d 2c 20 72 75 |ren(tree|Item, ru|
|00004f40| 6c 65 73 2c 20 65 78 74 | 65 72 6e 61 6c 2c 20 64 |les, ext|ernal, d|
|00004f50| 65 70 74 68 29 0a 7b 0a | 20 20 2f 2f 20 69 73 20 |epth).{.| // is |
|00004f60| 74 68 65 72 65 20 61 6e | 79 20 72 75 6c 65 20 69 |there an|y rule i|
|00004f70| 6e 20 74 68 65 20 73 74 | 79 6c 65 73 68 65 65 74 |n the st|ylesheet|
|00004f80| 20 3b 20 65 61 72 6c 61 | 79 20 77 61 79 20 6f 75 | ; earla|y way ou|
|00004f90| 74 20 69 66 20 6e 6f 74 | 0a 20 20 69 66 20 28 72 |t if not|. if (r|
|00004fa0| 75 6c 65 73 20 26 26 20 | 72 75 6c 65 73 2e 6c 65 |ules && |rules.le|
|00004fb0| 6e 67 74 68 29 20 7b 0a | 20 20 20 20 76 61 72 20 |ngth) {.| var |
|00004fc0| 73 75 62 74 72 65 65 63 | 68 69 6c 64 72 65 6e 20 |subtreec|hildren |
|00004fd0| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 63 72 65 61 74 |= docume|nt.creat|
|00004fe0| 65 45 6c 65 6d 65 6e 74 | 4e 53 28 58 55 4c 5f 4e |eElement|NS(XUL_N|
|00004ff0| 53 2c 20 22 74 72 65 65 | 63 68 69 6c 64 72 65 6e |S, "tree|children|
|00005000| 22 29 3b 0a 20 20 20 20 | 76 61 72 20 6a 2c 20 6f |");. |var j, o|
|00005010| 3b 0a 20 20 20 20 76 61 | 72 20 73 75 62 74 72 65 |;. va|r subtre|
|00005020| 65 69 74 65 6d 2c 20 73 | 75 62 74 72 65 65 72 6f |eitem, s|ubtreero|
|00005030| 77 2c 20 73 75 62 74 72 | 65 65 63 65 6c 6c 3b 0a |w, subtr|eecell;.|
|00005040| 20 20 20 20 2f 2f 20 6c | 65 74 27 73 20 62 72 6f | // l|et's bro|
|00005050| 77 73 65 20 61 6c 6c 20 | 74 68 65 20 72 75 6c 65 |wse all |the rule|
|00005060| 73 0a 20 20 20 20 66 6f | 72 20 28 6a 3d 30 3b 20 |s. fo|r (j=0; |
|00005070| 6a 3c 20 72 75 6c 65 73 | 2e 6c 65 6e 67 74 68 3b |j< rules|.length;|
|00005080| 20 6a 2b 2b 29 20 7b 0a | 20 20 20 20 20 20 73 77 | j++) {.| sw|
|00005090| 69 74 63 68 20 28 72 75 | 6c 65 73 5b 6a 5d 2e 74 |itch (ru|les[j].t|
|000050a0| 79 70 65 29 20 7b 0a 20 | 20 20 20 20 20 20 20 63 |ype) {. | c|
|000050b0| 61 73 65 20 43 53 53 52 | 75 6c 65 2e 53 54 59 4c |ase CSSR|ule.STYL|
|000050c0| 45 5f 52 55 4c 45 3a 0a | 20 20 20 20 20 20 20 20 |E_RULE:.| |
|000050d0| 20 20 2f 2f 20 74 68 69 | 73 20 69 73 20 61 20 43 | // thi|s is a C|
|000050e0| 53 53 53 74 79 6c 65 52 | 75 6c 65 0a 20 20 20 20 |SSStyleR|ule. |
|000050f0| 20 20 20 20 20 20 73 75 | 62 74 72 65 65 69 74 65 | su|btreeite|
|00005100| 6d 20 20 3d 20 41 64 64 | 53 74 79 6c 65 52 75 6c |m = Add|StyleRul|
|00005110| 65 54 6f 54 72 65 65 43 | 68 69 6c 64 72 65 6e 28 |eToTreeC|hildren(|
|00005120| 72 75 6c 65 73 5b 6a 5d | 2c 20 65 78 74 65 72 6e |rules[j]|, extern|
|00005130| 61 6c 2c 20 64 65 70 74 | 68 29 3b 0a 20 20 20 20 |al, dept|h);. |
|00005140| 20 20 20 20 20 20 73 75 | 62 74 72 65 65 63 68 69 | su|btreechi|
|00005150| 6c 64 72 65 6e 2e 61 70 | 70 65 6e 64 43 68 69 6c |ldren.ap|pendChil|
|00005160| 64 28 73 75 62 74 72 65 | 65 69 74 65 6d 29 3b 0a |d(subtre|eitem);.|
|00005170| 20 20 20 20 20 20 20 20 | 20 20 62 72 65 61 6b 3b | | break;|
|00005180| 0a 20 20 20 20 20 20 20 | 20 63 61 73 65 20 43 53 |. | case CS|
|00005190| 53 52 75 6c 65 2e 50 41 | 47 45 5f 52 55 4c 45 3a |SRule.PA|GE_RULE:|
|000051a0| 0a 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 74 68 |. | // th|
|000051b0| 69 73 20 69 73 20 61 20 | 43 53 53 53 74 79 6c 65 |is is a |CSSStyle|
|000051c0| 52 75 6c 65 0a 20 20 20 | 20 20 20 20 20 20 20 73 |Rule. | s|
|000051d0| 75 62 74 72 65 65 69 74 | 65 6d 20 20 3d 20 41 64 |ubtreeit|em = Ad|
|000051e0| 64 50 61 67 65 52 75 6c | 65 54 6f 54 72 65 65 43 |dPageRul|eToTreeC|
|000051f0| 68 69 6c 64 72 65 6e 28 | 72 75 6c 65 73 5b 6a 5d |hildren(|rules[j]|
|00005200| 2c 20 65 78 74 65 72 6e | 61 6c 2c 20 64 65 70 74 |, extern|al, dept|
|00005210| 68 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 73 75 |h);. | su|
|00005220| 62 74 72 65 65 63 68 69 | 6c 64 72 65 6e 2e 61 70 |btreechi|ldren.ap|
|00005230| 70 65 6e 64 43 68 69 6c | 64 28 73 75 62 74 72 65 |pendChil|d(subtre|
|00005240| 65 69 74 65 6d 29 3b 0a | 20 20 20 20 20 20 20 20 |eitem);.| |
|00005250| 20 20 62 72 65 61 6b 3b | 0a 20 20 20 20 20 20 20 | break;|. |
|00005260| 20 63 61 73 65 20 43 53 | 53 52 75 6c 65 2e 49 4d | case CS|SRule.IM|
|00005270| 50 4f 52 54 5f 52 55 4c | 45 3a 0a 20 20 20 20 20 |PORT_RUL|E:. |
|00005280| 20 20 20 20 20 2f 2f 20 | 74 68 69 73 20 69 73 20 | // |this is |
|00005290| 43 53 53 49 6d 70 6f 72 | 74 52 75 6c 65 20 66 6f |CSSImpor|tRule fo|
|000052a0| 72 20 40 69 6d 70 6f 72 | 74 0a 20 20 20 20 20 20 |r @impor|t. |
|000052b0| 20 20 20 20 73 75 62 74 | 72 65 65 69 74 65 6d 20 | subt|reeitem |
|000052c0| 20 3d 20 41 64 64 49 6d | 70 6f 72 74 52 75 6c 65 | = AddIm|portRule|
|000052d0| 54 6f 54 72 65 65 43 68 | 69 6c 64 72 65 6e 28 72 |ToTreeCh|ildren(r|
|000052e0| 75 6c 65 73 5b 6a 5d 2c | 20 65 78 74 65 72 6e 61 |ules[j],| externa|
|000052f0| 6c 2c 20 64 65 70 74 68 | 29 3b 0a 20 20 20 20 20 |l, depth|);. |
|00005300| 20 20 20 20 20 73 75 62 | 74 72 65 65 63 68 69 6c | sub|treechil|
|00005310| 64 72 65 6e 2e 61 70 70 | 65 6e 64 43 68 69 6c 64 |dren.app|endChild|
|00005320| 28 73 75 62 74 72 65 65 | 69 74 65 6d 29 3b 0a 20 |(subtree|item);. |
|00005330| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0a | | break;.|
|00005340| 20 20 20 20 20 20 20 20 | 63 61 73 65 20 43 53 53 | |case CSS|
|00005350| 52 75 6c 65 2e 4d 45 44 | 49 41 5f 52 55 4c 45 3a |Rule.MED|IA_RULE:|
|00005360| 0a 20 20 20 20 20 20 20 | 20 20 20 2f 2f 20 74 68 |. | // th|
|00005370| 69 73 20 69 73 20 61 20 | 43 53 53 4d 65 64 69 61 |is is a |CSSMedia|
|00005380| 52 75 6c 65 20 40 6d 65 | 64 69 61 0a 20 20 20 20 |Rule @me|dia. |
|00005390| 20 20 20 20 20 20 73 75 | 62 74 72 65 65 69 74 65 | su|btreeite|
|000053a0| 6d 20 20 3d 20 64 6f 63 | 75 6d 65 6e 74 2e 63 72 |m = doc|ument.cr|
|000053b0| 65 61 74 65 45 6c 65 6d | 65 6e 74 4e 53 28 58 55 |eateElem|entNS(XU|
|000053c0| 4c 5f 4e 53 2c 20 22 74 | 72 65 65 69 74 65 6d 22 |L_NS, "t|reeitem"|
|000053d0| 29 3b 0a 20 20 20 20 20 | 20 20 20 20 20 73 75 62 |);. | sub|
|000053e0| 74 72 65 65 72 6f 77 20 | 20 20 3d 20 64 6f 63 75 |treerow | = docu|
|000053f0| 6d 65 6e 74 2e 63 72 65 | 61 74 65 45 6c 65 6d 65 |ment.cre|ateEleme|
|00005400| 6e 74 4e 53 28 58 55 4c | 5f 4e 53 2c 20 22 74 72 |ntNS(XUL|_NS, "tr|
|00005410| 65 65 72 6f 77 22 29 3b | 0a 20 20 20 20 20 20 20 |eerow");|. |
|00005420| 20 20 20 73 75 62 74 72 | 65 65 63 65 6c 6c 20 20 | subtr|eecell |
|00005430| 3d 20 64 6f 63 75 6d 65 | 6e 74 2e 63 72 65 61 74 |= docume|nt.creat|
|00005440| 65 45 6c 65 6d 65 6e 74 | 4e 53 28 58 55 4c 5f 4e |eElement|NS(XUL_N|
|00005450| 53 2c 20 22 74 72 65 65 | 63 65 6c 6c 22 29 3b 0a |S, "tree|cell");.|
|00005460| 20 20 20 20 20 20 20 20 | 20 20 2f 2f 20 73 68 6f | | // sho|
|00005470| 77 20 22 40 6d 65 64 69 | 61 22 20 61 6e 64 20 6d |w "@medi|a" and m|
|00005480| 65 64 69 61 20 6c 69 73 | 74 0a 20 20 20 20 20 20 |edia lis|t. |
|00005490| 20 20 20 20 73 75 62 74 | 72 65 65 63 65 6c 6c 2e | subt|reecell.|
|000054a0| 73 65 74 41 74 74 72 69 | 62 75 74 65 28 22 6c 61 |setAttri|bute("la|
|000054b0| 62 65 6c 22 2c 20 22 40 | 6d 65 64 69 61 20 22 2b |bel", "@|media "+|
|000054c0| 72 75 6c 65 73 5b 6a 5d | 2e 6d 65 64 69 61 2e 6d |rules[j]|.media.m|
|000054d0| 65 64 69 61 54 65 78 74 | 2c 20 65 78 74 65 72 6e |ediaText|, extern|
|000054e0| 61 6c 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 6f |al);. | o|
|000054f0| 20 3d 20 6e 65 77 4f 62 | 6a 65 63 74 28 20 73 75 | = newOb|ject( su|
|00005500| 62 74 72 65 65 69 74 65 | 6d 2c 20 65 78 74 65 72 |btreeite|m, exter|
|00005510| 6e 61 6c 2c 20 4d 45 44 | 49 41 5f 52 55 4c 45 2c |nal, MED|IA_RULE,|
|00005520| 20 72 75 6c 65 73 5b 6a | 5d 2c 20 66 61 6c 73 65 | rules[j|], false|
|00005530| 2c 20 64 65 70 74 68 20 | 29 3b 0a 20 20 20 20 20 |, depth |);. |
|00005540| 20 20 20 20 20 50 75 73 | 68 49 6e 4f 62 6a 65 63 | Pus|hInObjec|
|00005550| 74 73 41 72 72 61 79 28 | 6f 29 3b 0a 20 20 20 20 |tsArray(|o);. |
|00005560| 20 20 20 20 20 20 69 66 | 20 28 65 78 74 65 72 6e | if| (extern|
|00005570| 61 6c 29 20 7b 0a 20 20 | 20 20 20 20 20 20 20 20 |al) {. | |
|00005580| 20 20 73 75 62 74 72 65 | 65 63 65 6c 6c 2e 73 65 | subtre|ecell.se|
|00005590| 74 41 74 74 72 69 62 75 | 74 65 28 22 70 72 6f 70 |tAttribu|te("prop|
|000055a0| 65 72 74 69 65 73 22 2c | 20 22 65 78 74 65 72 6e |erties",| "extern|
|000055b0| 61 6c 22 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |al");. | |
|000055c0| 7d 0a 20 20 20 20 20 20 | 20 20 20 20 73 75 62 74 |}. | subt|
|000055d0| 72 65 65 72 6f 77 2e 61 | 70 70 65 6e 64 43 68 69 |reerow.a|ppendChi|
|000055e0| 6c 64 28 73 75 62 74 72 | 65 65 63 65 6c 6c 29 3b |ld(subtr|eecell);|
|000055f0| 0a 20 20 20 20 20 20 20 | 20 20 20 73 75 62 74 72 |. | subtr|
|00005600| 65 65 69 74 65 6d 2e 61 | 70 70 65 6e 64 43 68 69 |eeitem.a|ppendChi|
|00005610| 6c 64 28 73 75 62 74 72 | 65 65 72 6f 77 29 3b 0a |ld(subtr|eerow);.|
|00005620| 20 20 20 20 20 20 20 20 | 20 20 73 75 62 74 72 65 | | subtre|
|00005630| 65 69 74 65 6d 2e 73 65 | 74 41 74 74 72 69 62 75 |eitem.se|tAttribu|
|00005640| 74 65 28 22 63 6f 6e 74 | 61 69 6e 65 72 22 2c 20 |te("cont|ainer", |
|00005650| 22 74 72 75 65 22 29 3b | 0a 20 20 20 20 20 20 20 |"true");|. |
|00005660| 20 20 20 2f 2f 20 6c 65 | 74 27 73 20 62 72 6f 77 | // le|t's brow|
|00005670| 73 65 20 74 68 65 20 72 | 75 6c 65 73 20 61 74 74 |se the r|ules att|
|00005680| 61 63 68 65 64 20 74 6f | 20 74 68 69 73 20 43 53 |ached to| this CS|
|00005690| 53 4d 65 64 69 61 52 75 | 6c 65 2c 20 6b 65 65 70 |SMediaRu|le, keep|
|000056a0| 69 6e 67 20 74 68 65 0a | 20 20 20 20 20 20 20 20 |ing the.| |
|000056b0| 20 20 2f 2f 20 63 75 72 | 72 65 6e 74 20 65 78 74 | // cur|rent ext|
|000056c0| 65 72 6e 61 6c 20 61 6e | 64 20 69 6e 63 72 65 61 |ernal an|d increa|
|000056d0| 73 69 6e 67 20 64 65 70 | 74 68 0a 20 20 20 20 20 |sing dep|th. |
|000056e0| 20 20 20 20 20 41 64 64 | 52 75 6c 65 73 54 6f 54 | Add|RulesToT|
|000056f0| 72 65 65 63 68 69 6c 64 | 72 65 6e 28 73 75 62 74 |reechild|ren(subt|
|00005700| 72 65 65 69 74 65 6d 2c | 20 72 75 6c 65 73 5b 6a |reeitem,| rules[j|
|00005710| 5d 2e 63 73 73 52 75 6c | 65 73 2c 20 65 78 74 65 |].cssRul|es, exte|
|00005720| 72 6e 61 6c 2c 20 64 65 | 70 74 68 2b 31 29 3b 0a |rnal, de|pth+1);.|
|00005730| 20 20 20 20 20 20 20 20 | 20 20 73 75 62 74 72 65 | | subtre|
|00005740| 65 63 68 69 6c 64 72 65 | 6e 2e 61 70 70 65 6e 64 |echildre|n.append|
|00005750| 43 68 69 6c 64 28 73 75 | 62 74 72 65 65 69 74 65 |Child(su|btreeite|
|00005760| 6d 29 3b 0a 20 20 20 20 | 20 20 20 20 20 20 62 72 |m);. | br|
|00005770| 65 61 6b 3b 0a 20 20 20 | 20 20 20 20 20 63 61 73 |eak;. | cas|
|00005780| 65 20 43 53 53 52 75 6c | 65 2e 43 48 41 52 53 45 |e CSSRul|e.CHARSE|
|00005790| 54 5f 52 55 4c 45 3a 0a | 20 20 20 20 20 20 20 20 |T_RULE:.| |
|000057a0| 20 20 2f 2f 20 74 68 69 | 73 20 69 73 20 61 20 43 | // thi|s is a C|
|000057b0| 53 53 43 68 61 72 73 65 | 74 52 75 6c 65 0a 20 20 |SSCharse|tRule. |
|000057c0| 20 20 20 20 20 20 20 20 | 73 75 62 74 72 65 65 69 | |subtreei|
|000057d0| 74 65 6d 20 20 3d 20 64 | 6f 63 75 6d 65 6e 74 2e |tem = d|ocument.|
|000057e0| 63 72 65 61 74 65 45 6c | 65 6d 65 6e 74 4e 53 28 |createEl|ementNS(|
|000057f0| 58 55 4c 5f 4e 53 2c 20 | 22 74 72 65 65 69 74 65 |XUL_NS, |"treeite|
|00005800| 6d 22 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 73 |m");. | s|
|00005810| 75 62 74 72 65 65 72 6f | 77 20 20 20 3d 20 64 6f |ubtreero|w = do|
|00005820| 63 75 6d 65 6e 74 2e 63 | 72 65 61 74 65 45 6c 65 |cument.c|reateEle|
|00005830| 6d 65 6e 74 4e 53 28 58 | 55 4c 5f 4e 53 2c 20 22 |mentNS(X|UL_NS, "|
|00005840| 74 72 65 65 72 6f 77 22 | 29 3b 0a 20 20 20 20 20 |treerow"|);. |
|00005850| 20 20 20 20 20 73 75 62 | 74 72 65 65 63 65 6c 6c | sub|treecell|
|00005860| 20 20 3d 20 64 6f 63 75 | 6d 65 6e 74 2e 63 72 65 | = docu|ment.cre|
|00005870| 61 74 65 45 6c 65 6d 65 | 6e 74 4e 53 28 58 55 4c |ateEleme|ntNS(XUL|
|00005880| 5f 4e 53 2c 20 22 74 72 | 65 65 63 65 6c 6c 22 29 |_NS, "tr|eecell")|
|00005890| 3b 0a 20 20 20 20 20 20 | 20 20 20 20 2f 2f 20 73 |;. | // s|
|000058a0| 68 6f 77 20 22 40 63 68 | 61 72 73 65 74 22 20 61 |how "@ch|arset" a|
|000058b0| 6e 64 20 74 68 65 20 65 | 6e 63 6f 64 69 6e 67 0a |nd the e|ncoding.|
|000058c0| 20 20 20 20 20 20 20 20 | 20 20 73 75 62 74 72 65 | | subtre|
|000058d0| 65 63 65 6c 6c 2e 73 65 | 74 41 74 74 72 69 62 75 |ecell.se|tAttribu|
|000058e0| 74 65 28 22 6c 61 62 65 | 6c 22 2c 20 22 40 63 68 |te("labe|l", "@ch|
|000058f0| 61 72 73 65 74 20 22 2b | 72 75 6c 65 73 5b 6a 5d |arset "+|rules[j]|
|00005900| 2e 65 6e 63 6f 64 69 6e | 67 2c 20 65 78 74 65 72 |.encodin|g, exter|
|00005910| 6e 61 6c 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |nal);. | |
|00005920| 6f 20 3d 20 6e 65 77 4f | 62 6a 65 63 74 28 20 73 |o = newO|bject( s|
|00005930| 75 62 74 72 65 65 69 74 | 65 6d 2c 20 65 78 74 65 |ubtreeit|em, exte|
|00005940| 72 6e 61 6c 2c 20 43 48 | 41 52 53 45 54 5f 52 55 |rnal, CH|ARSET_RU|
|00005950| 4c 45 2c 20 72 75 6c 65 | 73 5b 6a 5d 2c 20 66 61 |LE, rule|s[j], fa|
|00005960| 6c 73 65 2c 20 64 65 70 | 74 68 20 29 3b 0a 20 20 |lse, dep|th );. |
|00005970| 20 20 20 20 20 20 20 20 | 50 75 73 68 49 6e 4f 62 | |PushInOb|
|00005980| 6a 65 63 74 73 41 72 72 | 61 79 28 6f 29 3b 0a 0a |jectsArr|ay(o);..|
|00005990| 0a 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 65 |. | if (e|
|000059a0| 78 74 65 72 6e 61 6c 29 | 20 7b 0a 20 20 20 20 20 |xternal)| {. |
|000059b0| 20 20 20 20 20 20 20 73 | 75 62 74 72 65 65 63 65 | s|ubtreece|
|000059c0| 6c 6c 2e 73 65 74 41 74 | 74 72 69 62 75 74 65 28 |ll.setAt|tribute(|
|000059d0| 22 70 72 6f 70 65 72 74 | 69 65 73 22 2c 20 22 65 |"propert|ies", "e|
|000059e0| 78 74 65 72 6e 61 6c 22 | 29 3b 0a 20 20 20 20 20 |xternal"|);. |
|000059f0| 20 20 20 20 20 7d 0a 20 | 20 20 20 20 20 20 20 20 | }. | |
|00005a00| 20 73 75 62 74 72 65 65 | 72 6f 77 2e 61 70 70 65 | subtree|row.appe|
|00005a10| 6e 64 43 68 69 6c 64 28 | 73 75 62 74 72 65 65 63 |ndChild(|subtreec|
|00005a20| 65 6c 6c 29 3b 0a 20 20 | 20 20 20 20 20 20 20 20 |ell);. | |
|00005a30| 73 75 62 74 72 65 65 69 | 74 65 6d 2e 61 70 70 65 |subtreei|tem.appe|
|00005a40| 6e 64 43 68 69 6c 64 28 | 73 75 62 74 72 65 65 72 |ndChild(|subtreer|
|00005a50| 6f 77 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 73 |ow);. | s|
|00005a60| 75 62 74 72 65 65 63 68 | 69 6c 64 72 65 6e 2e 61 |ubtreech|ildren.a|
|00005a70| 70 70 65 6e 64 43 68 69 | 6c 64 28 73 75 62 74 72 |ppendChi|ld(subtr|
|00005a80| 65 65 69 74 65 6d 29 3b | 0a 20 20 20 20 20 20 20 |eeitem);|. |
|00005a90| 20 20 20 62 72 65 61 6b | 3b 20 20 20 20 20 20 20 | break|; |
|00005aa0| 20 20 20 0a 20 20 20 20 | 20 20 7d 0a 20 20 20 20 | . | }. |
|00005ab0| 7d 0a 20 20 20 20 74 72 | 65 65 49 74 65 6d 2e 61 |}. tr|eeItem.a|
|00005ac0| 70 70 65 6e 64 43 68 69 | 6c 64 28 73 75 62 74 72 |ppendChi|ld(subtr|
|00005ad0| 65 65 63 68 69 6c 64 72 | 65 6e 29 3b 0a 20 20 7d |eechildr|en);. }|
|00005ae0| 0a 7d 0a 0a 66 75 6e 63 | 74 69 6f 6e 20 47 65 74 |.}..func|tion Get|
|00005af0| 53 65 6c 65 63 74 65 64 | 49 74 65 6d 44 61 74 61 |Selected|ItemData|
|00005b00| 28 29 0a 7b 0a 20 20 2f | 2f 20 67 65 74 20 74 68 |().{. /|/ get th|
|00005b10| 65 20 73 65 6c 65 63 74 | 65 64 20 74 72 65 65 20 |e select|ed tree |
|00005b20| 69 74 65 6d 20 28 69 66 | 20 61 6e 79 29 0a 20 20 |item (if| any). |
|00005b30| 76 61 72 20 73 65 6c 65 | 63 74 65 64 49 74 65 6d |var sele|ctedItem|
|00005b40| 20 3d 20 20 67 65 74 53 | 65 6c 65 63 74 65 64 49 | = getS|electedI|
|00005b50| 74 65 6d 28 67 44 69 61 | 6c 6f 67 2e 73 68 65 65 |tem(gDia|log.shee|
|00005b60| 74 73 54 72 65 65 29 3b | 0a 20 20 67 44 69 61 6c |tsTree);|. gDial|
|00005b70| 6f 67 2e 73 65 6c 65 63 | 74 65 64 49 6e 64 65 78 |og.selec|tedIndex|
|00005b80| 20 20 3d 20 2d 31 3b 0a | 20 20 67 44 69 61 6c 6f | = -1;.| gDialo|
|00005b90| 67 2e 73 65 6c 65 63 74 | 65 64 4f 62 6a 65 63 74 |g.select|edObject|
|00005ba0| 20 3d 20 6e 75 6c 6c 3b | 0a 0a 20 20 69 66 20 28 | = null;|.. if (|
|00005bb0| 21 6f 62 6a 65 63 74 73 | 41 72 72 61 79 29 0a 20 |!objects|Array). |
|00005bc0| 20 20 20 72 65 74 75 72 | 6e 3b 0a 20 20 2f 2f 20 | retur|n;. // |
|00005bd0| 6c 6f 6f 6b 20 66 6f 72 | 20 74 68 65 20 6f 62 6a |look for| the obj|
|00005be0| 65 63 74 20 69 6e 20 6f | 62 6a 65 63 74 73 41 72 |ect in o|bjectsAr|
|00005bf0| 72 61 79 20 63 6f 72 72 | 65 73 70 6f 6e 64 69 6e |ray corr|espondin|
|00005c00| 67 20 74 6f 20 74 68 65 | 0a 20 20 2f 2f 20 73 65 |g to the|. // se|
|00005c10| 6c 65 63 74 65 64 49 74 | 65 6d 0a 20 20 76 61 72 |lectedIt|em. var|
|00005c20| 20 69 2c 20 6c 20 3d 20 | 6f 62 6a 65 63 74 73 41 | i, l = |objectsA|
|00005c30| 72 72 61 79 2e 6c 65 6e | 67 74 68 3b 0a 20 20 69 |rray.len|gth;. i|
|00005c40| 66 20 28 73 65 6c 65 63 | 74 65 64 49 74 65 6d 29 |f (selec|tedItem)|
|00005c50| 20 7b 0a 20 20 20 20 66 | 6f 72 20 28 69 3d 30 3b | {. f|or (i=0;|
|00005c60| 20 69 3c 6c 3b 20 69 2b | 2b 29 20 7b 0a 20 20 20 | i<l; i+|+) {. |
|00005c70| 20 20 20 69 66 20 28 6f | 62 6a 65 63 74 73 41 72 | if (o|bjectsAr|
|00005c80| 72 61 79 5b 69 5d 2e 78 | 75 6c 45 6c 74 20 3d 3d |ray[i].x|ulElt ==|
|00005c90| 20 73 65 6c 65 63 74 65 | 64 49 74 65 6d 29 20 7b | selecte|dItem) {|
|00005ca0| 0a 20 20 20 20 20 20 20 | 20 67 44 69 61 6c 6f 67 |. | gDialog|
|00005cb0| 2e 73 65 6c 65 63 74 65 | 64 49 6e 64 65 78 20 20 |.selecte|dIndex |
|00005cc0| 3d 20 69 3b 0a 20 20 20 | 20 20 20 20 20 67 44 69 |= i;. | gDi|
|00005cd0| 61 6c 6f 67 2e 74 72 65 | 65 49 74 65 6d 20 20 20 |alog.tre|eItem |
|00005ce0| 20 20 20 20 3d 20 6f 62 | 6a 65 63 74 73 41 72 72 | = ob|jectsArr|
|00005cf0| 61 79 5b 69 5d 2e 78 75 | 6c 45 6c 74 3b 0a 20 20 |ay[i].xu|lElt;. |
|00005d00| 20 20 20 20 20 20 67 44 | 69 61 6c 6f 67 2e 65 78 | gD|ialog.ex|
|00005d10| 74 65 72 6e 61 6c 4f 62 | 6a 65 63 74 20 3d 20 6f |ternalOb|ject = o|
|00005d20| 62 6a 65 63 74 73 41 72 | 72 61 79 5b 69 5d 2e 65 |bjectsAr|ray[i].e|
|00005d30| 78 74 65 72 6e 61 6c 3b | 0a 20 20 20 20 20 20 20 |xternal;|. |
|00005d40| 20 67 44 69 61 6c 6f 67 | 2e 73 65 6c 65 63 74 65 | gDialog|.selecte|
|00005d50| 64 54 79 70 65 20 20 20 | 3d 20 6f 62 6a 65 63 74 |dType |= object|
|00005d60| 73 41 72 72 61 79 5b 69 | 5d 2e 74 79 70 65 3b 0a |sArray[i|].type;.|
|00005d70| 20 20 20 20 20 20 20 20 | 67 44 69 61 6c 6f 67 2e | |gDialog.|
|00005d80| 73 65 6c 65 63 74 65 64 | 4f 62 6a 65 63 74 20 3d |selected|Object =|
|00005d90| 20 6f 62 6a 65 63 74 73 | 41 72 72 61 79 5b 69 5d | objects|Array[i]|
|00005da0| 2e 63 73 73 45 6c 74 3b | 0a 20 20 20 20 20 20 20 |.cssElt;|. |
|00005db0| 20 67 44 69 61 6c 6f 67 | 2e 6d 6f 64 69 66 69 65 | gDialog|.modifie|
|00005dc0| 64 4f 62 6a 65 63 74 20 | 3d 20 6f 62 6a 65 63 74 |dObject |= object|
|00005dd0| 73 41 72 72 61 79 5b 69 | 5d 2e 6d 6f 64 69 66 69 |sArray[i|].modifi|
|00005de0| 65 64 3b 0a 20 20 20 20 | 20 20 20 20 67 44 69 61 |ed;. | gDia|
|00005df0| 6c 6f 67 2e 64 65 70 74 | 68 4f 62 6a 65 63 74 20 |log.dept|hObject |
|00005e00| 20 20 20 3d 20 6f 62 6a | 65 63 74 73 41 72 72 61 | = obj|ectsArra|
|00005e10| 79 5b 69 5d 2e 64 65 70 | 74 68 3b 0a 20 20 20 20 |y[i].dep|th;. |
|00005e20| 20 20 20 20 62 72 65 61 | 6b 3b 0a 20 20 20 20 20 | brea|k;. |
|00005e30| 20 7d 0a 20 20 20 20 7d | 0a 20 20 7d 0a 7d 0a 0a | }. }|. }.}..|
|00005e40| 2f 2f 20 2a 20 73 65 6c | 65 63 74 73 20 65 69 74 |// * sel|ects eit|
|00005e50| 68 65 72 20 61 20 74 72 | 65 65 20 69 74 65 6d 20 |her a tr|ee item |
|00005e60| 28 73 68 65 65 74 2c 20 | 72 75 6c 65 29 20 6f 72 |(sheet, |rule) or|
|00005e70| 20 61 20 74 61 62 0a 2f | 2f 20 20 20 69 6e 20 74 | a tab./|/ in t|
|00005e80| 68 65 20 66 6f 72 6d 65 | 72 20 63 61 73 65 2c 20 |he forme|r case, |
|00005e90| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 69 73 |the para|meter is|
|00005ea0| 20 6e 75 6c 6c 20 3b 20 | 69 6e 20 74 68 65 20 6c | null ; |in the l|
|00005eb0| 61 74 74 65 72 2c 0a 2f | 2f 20 20 20 74 68 65 20 |atter,./|/ the |
|00005ec0| 70 61 72 61 6d 65 74 65 | 72 20 69 73 20 61 20 73 |paramete|r is a s|
|00005ed0| 74 72 69 6e 67 20 63 6f | 6e 74 61 69 6e 69 6e 67 |tring co|ntaining|
|00005ee0| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|00005ef0| 20 73 65 6c 65 63 74 65 | 64 20 74 61 62 0a 2f 2f | selecte|d tab.//|
|00005f00| 20 20 20 70 61 72 61 6d | 20 53 74 72 69 6e 67 20 | param| String |
|00005f10| 74 61 62 0a 66 75 6e 63 | 74 69 6f 6e 20 6f 6e 53 |tab.func|tion onS|
|00005f20| 65 6c 65 63 74 43 53 53 | 54 72 65 65 49 74 65 6d |electCSS|TreeItem|
|00005f30| 28 74 61 62 29 0a 7b 0a | 20 20 2f 2f 20 63 6f 6e |(tab).{.| // con|
|00005f40| 76 65 72 74 20 74 68 65 | 20 74 61 62 20 73 74 72 |vert the| tab str|
|00005f50| 69 6e 67 20 69 6e 74 6f | 20 61 20 74 61 62 20 69 |ing into| a tab i|
|00005f60| 64 0a 20 20 69 66 20 20 | 20 20 20 20 28 74 61 62 |d. if | (tab|
|00005f70| 20 3d 3d 20 22 67 65 6e | 65 72 61 6c 22 29 20 20 | == "gen|eral") |
|00005f80| 20 20 20 20 20 74 61 62 | 20 3d 20 47 45 4e 45 52 | tab| = GENER|
|00005f90| 41 4c 5f 54 41 42 3b 0a | 20 20 65 6c 73 65 20 69 |AL_TAB;.| else i|
|00005fa0| 66 20 28 74 61 62 20 3d | 3d 20 22 74 65 78 74 22 |f (tab =|= "text"|
|00005fb0| 29 20 20 20 20 20 20 20 | 20 20 20 74 61 62 20 3d |) | tab =|
|00005fc0| 20 54 45 58 54 5f 54 41 | 42 3b 0a 20 20 65 6c 73 | TEXT_TA|B;. els|
|00005fd0| 65 20 69 66 20 28 74 61 | 62 20 3d 3d 20 22 62 61 |e if (ta|b == "ba|
|00005fe0| 63 6b 67 72 6f 75 6e 64 | 22 29 20 20 20 20 74 61 |ckground|") ta|
|00005ff0| 62 20 3d 20 42 41 43 4b | 47 52 4f 55 4e 44 5f 54 |b = BACK|GROUND_T|
|00006000| 41 42 3b 0a 20 20 65 6c | 73 65 20 69 66 20 28 74 |AB;. el|se if (t|
|00006010| 61 62 20 3d 3d 20 22 62 | 6f 72 64 65 72 22 29 20 |ab == "b|order") |
|00006020| 20 20 20 20 20 20 20 74 | 61 62 20 3d 20 42 4f 52 | t|ab = BOR|
|00006030| 44 45 52 5f 54 41 42 3b | 0a 20 20 65 6c 73 65 20 |DER_TAB;|. else |
|00006040| 69 66 20 28 74 61 62 20 | 3d 3d 20 22 62 6f 78 22 |if (tab |== "box"|
|00006050| 29 20 20 20 20 20 20 20 | 20 20 20 20 74 61 62 20 |) | tab |
|00006060| 3d 20 42 4f 58 5f 54 41 | 42 3b 0a 20 20 65 6c 73 |= BOX_TA|B;. els|
|00006070| 65 20 69 66 20 28 74 61 | 62 20 3d 3d 20 22 61 75 |e if (ta|b == "au|
|00006080| 72 61 6c 22 29 20 20 20 | 20 20 20 20 20 20 74 61 |ral") | ta|
|00006090| 62 20 3d 20 41 55 52 41 | 4c 5f 54 41 42 3b 0a 20 |b = AURA|L_TAB;. |
|000060a0| 20 65 6c 73 65 20 69 66 | 20 28 74 61 62 20 3d 3d | else if| (tab ==|
|000060b0| 20 22 6c 69 73 74 22 29 | 20 20 20 20 20 20 20 20 | "list")| |
|000060c0| 20 20 74 61 62 20 3d 20 | 4c 49 53 54 5f 54 41 42 | tab = |LIST_TAB|
|000060d0| 3b 0a 0a 0a 20 20 47 65 | 74 53 65 6c 65 63 74 65 |;... Ge|tSelecte|
|000060e0| 64 49 74 65 6d 44 61 74 | 61 28 29 3b 0a 0a 20 20 |dItemDat|a();.. |
|000060f0| 69 66 20 28 67 44 69 61 | 6c 6f 67 2e 73 65 6c 65 |if (gDia|log.sele|
|00006100| 63 74 65 64 49 6e 64 65 | 78 20 3d 3d 20 2d 31 29 |ctedInde|x == -1)|
|00006110| 20 7b 0a 20 20 20 20 2f | 2f 20 74 68 65 72 65 20 | {. /|/ there |
|00006120| 69 73 20 6e 6f 20 74 72 | 65 65 20 69 74 65 6d 20 |is no tr|ee item |
|00006130| 73 65 6c 65 63 74 65 64 | 2c 20 6c 65 74 27 73 20 |selected|, let's |
|00006140| 66 61 6c 6c 62 61 63 6b | 20 74 6f 20 74 68 65 20 |fallback| to the |
|00006150| 49 6e 66 6f 20 74 61 62 | 0a 20 20 20 20 2f 2f 20 |Info tab|. // |
|00006160| 62 75 74 20 74 68 65 72 | 65 20 69 73 20 6e 6f 74 |but ther|e is not|
|00006170| 68 69 6e 67 20 77 65 20 | 63 61 6e 20 64 69 73 70 |hing we |can disp|
|00006180| 6c 61 79 20 69 6e 20 74 | 68 61 74 20 74 61 62 2e |lay in t|hat tab.|
|00006190| 2e 2e 0a 20 20 20 20 67 | 44 69 61 6c 6f 67 2e 73 |... g|Dialog.s|
|000061a0| 68 65 65 74 54 61 62 62 | 6f 78 2e 73 65 6c 65 63 |heetTabb|ox.selec|
|000061b0| 74 65 64 54 61 62 20 3d | 20 67 44 69 61 6c 6f 67 |tedTab =| gDialog|
|000061c0| 2e 73 68 65 65 74 49 6e | 66 6f 54 61 62 3b 0a 20 |.sheetIn|foTab;. |
|000061d0| 20 20 20 72 65 74 75 72 | 6e 3b 0a 20 20 7d 0a 0a | retur|n;. }..|
|000061e0| 20 20 76 61 72 20 65 78 | 74 65 72 6e 61 6c 20 20 | var ex|ternal |
|000061f0| 3d 20 6f 62 6a 65 63 74 | 73 41 72 72 61 79 5b 67 |= object|sArray[g|
|00006200| 44 69 61 6c 6f 67 2e 73 | 65 6c 65 63 74 65 64 49 |Dialog.s|electedI|
|00006210| 6e 64 65 78 5d 2e 65 78 | 74 65 72 6e 61 6c 3b 0a |ndex].ex|ternal;.|
|00006220| 20 20 76 61 72 20 74 79 | 70 65 20 20 20 20 20 20 | var ty|pe |
|00006230| 3d 20 6f 62 6a 65 63 74 | 73 41 72 72 61 79 5b 67 |= object|sArray[g|
|00006240| 44 69 61 6c 6f 67 2e 73 | 65 6c 65 63 74 65 64 49 |Dialog.s|electedI|
|00006250| 6e 64 65 78 5d 2e 74 79 | 70 65 3b 0a 20 20 76 61 |ndex].ty|pe;. va|
|00006260| 72 20 63 73 73 4f 62 6a | 65 63 74 20 3d 20 67 44 |r cssObj|ect = gD|
|00006270| 69 61 6c 6f 67 2e 73 65 | 6c 65 63 74 65 64 4f 62 |ialog.se|lectedOb|
|00006280| 6a 65 63 74 3b 0a 20 20 | 2f 2f 20 4c 65 74 27 73 |ject;. |// Let's|
|00006290| 20 75 70 64 61 74 65 20 | 74 68 65 20 62 75 74 74 | update |the butt|
|000062a0| 6f 6e 73 20 64 65 70 65 | 6e 64 69 6e 67 20 6f 6e |ons depe|nding on|
|000062b0| 20 77 68 61 74 20 6b 69 | 6e 64 20 6f 66 20 6f 62 | what ki|nd of ob|
|000062c0| 6a 65 63 74 20 69 73 0a | 20 20 2f 2f 20 73 65 6c |ject is.| // sel|
|000062d0| 65 63 74 65 64 20 69 6e | 20 74 68 65 20 74 72 65 |ected in| the tre|
|000062e0| 65 0a 20 20 55 70 64 61 | 74 65 42 75 74 74 6f 6e |e. Upda|teButton|
|000062f0| 73 28 21 65 78 74 65 72 | 6e 61 6c 2c 20 21 65 78 |s(!exter|nal, !ex|
|00006300| 74 65 72 6e 61 6c 2c 20 | 74 72 75 65 2c 20 74 72 |ternal, |true, tr|
|00006310| 75 65 2c 20 21 65 78 74 | 65 72 6e 61 6c 2c 20 28 |ue, !ext|ernal, (|
|00006320| 21 65 78 74 65 72 6e 61 | 6c 20 7c 7c 20 28 74 79 |!externa|l || (ty|
|00006330| 70 65 20 3d 3d 20 53 48 | 45 45 54 29 29 20 29 3b |pe == SH|EET)) );|
|00006340| 0a 0a 20 20 69 66 20 28 | 67 44 69 61 6c 6f 67 2e |.. if (|gDialog.|
|00006350| 73 65 6c 65 63 74 65 64 | 54 79 70 65 20 21 3d 20 |selected|Type != |
|00006360| 53 54 59 4c 45 5f 52 55 | 4c 45 29 20 7b 0a 20 20 |STYLE_RU|LE) {. |
|00006370| 20 20 2f 2f 20 75 73 65 | 72 20 64 69 64 20 6e 6f | // use|r did no|
|00006380| 74 20 73 65 6c 65 63 74 | 20 61 20 43 53 53 53 74 |t select| a CSSSt|
|00006390| 79 6c 65 52 75 6c 65 2c | 20 6c 65 74 27 73 20 66 |yleRule,| let's f|
|000063a0| 61 6c 6c 62 61 63 6b 20 | 74 6f 20 49 6e 66 6f 20 |allback |to Info |
|000063b0| 74 61 62 0a 20 20 20 20 | 74 61 62 20 3d 20 47 45 |tab. |tab = GE|
|000063c0| 4e 45 52 41 4c 5f 54 41 | 42 3b 0a 20 20 7d 0a 20 |NERAL_TA|B;. }. |
|000063d0| 20 69 66 20 28 21 74 61 | 62 29 20 7b 0a 20 20 20 | if (!ta|b) {. |
|000063e0| 20 2f 2f 20 74 68 69 73 | 20 6d 65 74 68 6f 64 20 | // this| method |
|000063f0| 67 65 74 73 20 63 61 6c | 6c 65 64 20 62 79 20 61 |gets cal|led by a|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.